On Tue, 16 Oct 2001, Dan Sugalski wrote: > Parrot's going with the "one thread per interpreter" model of > threading.
Yay! > PMCs will be shareable, but only when explicitly marked as shared. Passing > an unshared PMC to another interpreter's a fatal error. PMCs *can* be > cloned when an interpreter is created, and they may also have their > contents be copied into a PMC for another interpreter at specific > coordination points. You may *not* put an unshared PMC into a shared container. <snip> > PMCs that are shared between interpreters are responsible for > maintaining their own internal integrity. To this end, every vtable > has a shadow "shared" vtable. When a PMC is shared, a mutex is created > for it and the shadow vtable is switched in. The functions in this > vtable should lock and unlock the PMC's mutex as need be to maintain > its internal integrity. (If that's even necessary--PMC types that use > only the integer cache portion of the PMC header might not need to, > for example) OK, just to clarify: If I write module 'X' in say, C, I am responsible for providing two vtables for my objects, one shared and one not shared? I like this model, and I'm anxious to start writing threaded Parrot applications. :-) - D <[EMAIL PROTECTED]>