Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

Ross Ridge rridge at csclub.uwaterloo.ca
Tue Nov 7 18:57:11 CET 2006


Ross Ridge wrote:
> That doesn't really make sense.  The object can't be deleted because
> the thread should already have a reference (directly or indirectly) to
> the object, otherwise any access to it can cause the race condition you
> describe.

Joe Seigh wrote:
> True but if the thread didn't already have a reference, how would you get
> that initial reference to a shared object without a lock?

The thread that shares it increments the reference count before passing
its address to directly another thread or indirectly through a shared
container.

                                Ross Ridge




More information about the Python-list mailing list