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

Harri Pesonen fuerte at sci.fi
Tue Sep 16 14:43:37 EDT 2003


Brian Quinlan wrote:

>>There is no object-level locking in my proposal. Just independent
>>free-threaded interpreters, which don't see the objects of other
>>interpreters at all.
>>    
>>
>OK, but this is useless to the average Python programmer. It is only
>useful to people embedding Python interpreters in multithreaded
>applications. I would imagine that this represents <1% of Python users.
>
No, all Python developers who create threads would benefit as well. It's 
probably another 1%.

>>There could be an extra global interpreter state for shared-memory
>>object access. Accessing this would always be synchronized, but only
>>this. Python would automatically copy data from this state to
>>thread-local state and back when needed. This would require a special
>>syntax for variables in global state:
>>    
>>
>
>So now you want to change the language definition for the benefit of a
>small minority of users?
>  
>
No, change the language definition (if needed) for the benefit of real 
multitasking.

Harri

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20030916/5c6ffb4c/attachment.html>


More information about the Python-list mailing list