A couple of other scenerios Thread 1 Thread 2 push(@a, @b); $a[35]++ User level cross variable consistancy. push(@a, $b); $acount++ if $b <35; Even cooperative threading doesn't help. <chaim> >>>>> "SWM" == Steven W McDougall <[EMAIL PROTECTED]> writes: SWM> Others have pointed out that code inside sub-expressions and blocks SWM> could also assign to our variables. This is true, but it isn't our SWM> problem. As long as each assignment is carried out correctly by the SWM> interpreter, then each variable always has a valid value, computed SWM> from other valid values. For example, SWM> $a = "abcd"; SWM> $b = "wxyz"; SWM> Thread A Thread B SWM> $a = $b; $b = $a; SWM> All the interpreter guarantees is SWM> 1. It won't crash. SWM> 2. After both threads run, $a and $b are both either "abcd" or "wxyz", SWM> (and not, for example, "abyz"). SWM> If the user cares whether the final values of $a and $b are "abcd" or SWM> "wxyz", then they have to do their own synchronization. -- Chaim Frenkel Nonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183
- Are Perl6 threads preemptive or cooperative? Steven W McDougall
- Re: Are Perl6 threads preemptive or cooperative? Dan Sugalski
- Re: Are Perl6 threads preemptive or cooperativ... David L. Nicol
- Re: Are Perl6 threads preemptive or cooper... Dan Sugalski
- Re: Are Perl6 threads preemptive or co... Markus Peter
- Re: Are Perl6 threads preemptive or co... Steven W McDougall
- Re: Are Perl6 threads preemptive ... Glenn Linderman
- Re: Are Perl6 threads preemptive ... David L. Nicol
- Re: Are Perl6 threads preempt... Steven W McDougall
- Re: Are Perl6 threads pre... Markus Peter
- Re: Are Perl6 threads pre... Chaim Frenkel
- Re: Are Perl6 threads pre... Steven W McDougall
- Re: Are Perl6 threads pre... Chaim Frenkel
- Re: Are Perl6 threads pre... Steven W McDougall
- Re: Are Perl6 threads preemptive or cooperative? Markus Peter
- Re: Are Perl6 threads preemptive or cooperative? Markus Peter
- Re: Are Perl6 threads preemptive or cooperativ... David L. Nicol
- Re: Are Perl6 threads preemptive or cooper... Bryan C . Warnock
- Re: Are Perl6 threads preemptive or co... David L. Nicol
- Re: Are Perl6 threads preemptive ... Dan Sugalski
- Re: Are Perl6 threads preemptive ... Chaim Frenkel