Re: Thread usage cases

2000-08-19 Thread Chaim Frenkel
> "BCW" == Bryan C Warnock <[EMAIL PROTECTED]> writes: >> 3. Subroutines >> >> sub foo { print "foo" } >> >> Thread1 Thread2 >> foo(); eval 'sub foo { print "bar" }'; >> >> This prints either "foo" or "bar". >> >> Thread2 replaces the coderef for &main::foo. Th

Re: Thread usage cases

2000-08-19 Thread Bryan C . Warnock
On Fri, 18 Aug 2000, Steven W McDougall wrote: > Thread1 Thread2 > push @a, (1, 2, 3); push @a, (4, 5, 6); > > The interesting question is whether push is atomic. Array operations should be atomic. > > Atomic > @a is either (1, 2, 3, 4, 5, 6) or (4, 5, 6, 1, 2,

Re: Thread usage cases

2000-08-18 Thread Christopher J. Madsen
Steven W McDougall writes: > 4. Regular expressions > It seems like an RE match should be atomic, because it hard to imagine > it executing sensibly if the target string changes during the match. > But then we have > > Thread1 Thread2 > $a =~ s/.../.../e; $a