In message <[EMAIL PROTECTED]>
          Chaim Frenkel <[EMAIL PROTECTED]> wrote:

> Why not
>       lock(%y);
>       foreach my $x (keys %y) {
>               $y{$x+1} = 1;
>       }
>       unlock(%y);
>
> Hmm, I just realized, perhaps we can just punt. Any p5 program that
> doesn't use Threads can be left alone. Using p5 threads would
> then need manual intervention.

I wasn't just talking about the threaded case though - the point
which I was making was that of what happens if a single threaded
program alters a hash in the middle of iterating it.

Currently keys and values are flattened when they are seen so any
change to the hash is not reflected in the resulting list. If we
are iterating instead of flattening then we need to address that
somehow.

Tom

-- 
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/
...It pays to be obvious, especially if you have a reputation for subtlety.

Reply via email to