At 03:58 PM 10/16/2001 -0500, David M. Lloyd wrote:
>On Tue, 16 Oct 2001, Dan Sugalski wrote:
><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?

Maybe. What I'd like is for the vtable preprocessor to have an option to 
generate both, with the threaded version automagically sorting and locking 
(recursively, and at a low level) the shared PMCs pased in. More overhead, 
definitely, but it beats crashing.

You'd have an option to mark a function and tell the preprocessor that you 
have your own locking scheme or skip it altogether when appropriate.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to