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

Aahz aahz at pythoncraft.com
Mon Sep 15 22:53:48 CEST 2003


In article <mwo9b.242$B13.103 at reader1.news.jippii.net>,
Harri Pesonen  <fuerte at sci.fi> wrote:
>
>The point I was trying to make (not in this message but in general) is 
>that it would be simple (trivial but tedious) to create a version of 
>Python that is thread-safe, and the only reason it is not done is 
>because it would break old code. 

You're wrong.  You have refused to do your research, and you have been
ignoring information people provide to you.

>Only one global variable left (in fact there is Py_None as well). 

You're wrong.  There are only two global *C* variables -- but all Python
objects are global.  Most people want to share information between
threads; as soon as that becomes a requirement, you run into *BIG*
problems with refcounting and garbage collection when you do free
threading.  That doesn't even count the problem I mentioned earlier
about interfacing with thread-unsafe libraries.

Now, would you care to learn how Python actually works before making
further pronouncements?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan




More information about the Python-list mailing list