[Python-Dev] Making python C-API thread safe (try 2)

Greg Ewing greg at cosc.canterbury.ac.nz
Fri Sep 12 16:11:28 EDT 2003


> Yes, I'm aware of the None problem at least (only one instance of it). 
> Please enlighten me about the other critical sections? Object 
> allocation/freeing?

None is only the molecule at the tip of the iceberg.  If you're
talking about threads within a Python interpreter, doing just about
anything at all to any Python object is a critical section. The amount
of locking required to deal with that at a fine-grained level would
totally kill performance, not to mention being hugely tedious and
error-prone to implement.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+



More information about the Python-Dev mailing list