John Tobey wrote:
> Sorry, I fail to see why.  To upgrade or destroy an object:
> 
>     1. lock the object
>     2. lock the source arena
>     3. lock the destination arena
>     4. move bits
>     5. unlock the destination arena
>     6. unlock the source arena
>     7. unlock the object

Arenas should not be shared between interpreters. Shared objects
should go into special arenas so that the allocator and the GC don't
have to worry about shared objects for the normal case. Shared
object arenas can only use a non-moving collector unless the GC locks
each object. Checking for garbage doesn't require locking because
garbage can never be locked.

If Chaim's suggestion of hiding shared objects behind a ref is
adopted, locks dealing with upgrading an object are buried inside
the method code for the ref type.

- Ken

Reply via email to