>>>>> "PRL" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes:
PRL> =head2 Freezing state for keys and values efficiently
PRL> I believe this problem can be solved by using the vtable for the
PRL> hash to wrap any mutating functions with a completion routine that
PRL> will advance the iterator to completion, creating a temporary list
PRL> of copied keys/values that it can then continue to iterate over.
Have versioned hash entries. Iterators would know what version of the
hash they are operating on.
This could be a lot more efficient than modifying the vtbl and filling
up the stack with the keys. I really am suspicious of replacing the
vtbl entry, there may be more than one thread working its way through
the hash.
<chaim>
--
Chaim Frenkel Nonlinear Knowledge, Inc.
[EMAIL PROTECTED] +1-718-236-0183