[Python-Dev] Re: A word from the author

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sun, 4 Feb 2001 18:43:34 +0100


> Although the core objects won't be affected by this change because
> of the interpreter lock protection, we have no provisions so far for
> custom object's thread safety.

If I understand your concern correctly, you are worried that somebody
uses your allocator without holding the interpreter lock.

I think it is *extremely* unlikely that a module author will use any
Py* function or macro while not holding the lock. I've analyzed a few
freely-available extension modules in this respect, and found no
occurence of such code.

The right way is to document that restriction, both in NEWS and in the
C API documentation, and accept the unlikely chance of breaking
something.

Regards,
Martin