Re: Are Perl6 threads preemptive or cooperative?
[email protected] (Chaim Frenkel) 27 Aug 2000 09:55:35 -0400
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "SWM" == Steven W McDougall <[email protected]> writes: SWM> I don't understand the problem with these scenarios. >> A couple of other scenerios >> >> Thread 1 Thread 2 >> push(@a, @b); $a[35]++ >> Cooperative threads do not solve consistance issues. The array, its contents may have multiple aliases. There are other ranges of atomic 'transactions'. SWM> What does >> User level cross variable consistancy. SWM> mean? That a user my need to have two or more variables in sync for proper operation. And cooperative threads don't address that issue. >> push(@a, $b); >> $acount++ if $b <35; >> >> >> Even cooperative threading doesn't help. SWM> Doesn't help with what? Solving consistance that crosses statement boundaries. Here's another one. $x = 3 + &foo() - &bar(); Where does the yield happen? What happens to the yields that are already in the 'optree' for foo and bar? Cooperative only helps _perhaps_ with perl not needing to protrect its own structures. <chaim> -- Chaim Frenkel Nonlinear Knowledge, Inc. [email protected] +1-718-236-0183