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

Ross Ridge rridge at csclub.uwaterloo.ca
Tue Nov 7 23:48:35 CET 2006

Martin v. Löwis wrote:
> How would you propose to fix file_repr to prevent such
> a race condition?

Ross Ridge schrieb:
> The race condition you describe is different from the one Joe Seigh
> described.  It's caused because without GIL access to the file object
> is no longer thread safe, not because reference counting isn't thread
> safe.

Martin v. Löwis wrote:
> Joe's claim (quoting him) was: "Atomic increment and decrement
> instructions are not by themselves sufficient to make reference
> counting safe."

So give an example where reference counting is unsafe.

Remember that I only said that Joe Seigh's statement didn't make sense,
not that I had some magic solution that would somehow make Python
thread safe without locking.   

                   Ross Ridge

More information about the Python-list mailing list