Antoine Pitrou wrote:
> Le dimanche 17 septembre 2006 à 23:16 +1000, Nick Coghlan a écrit :
>> Brett Cannon's sandboxing work (which aims to provide first-class support 
>> for 
>> multiple interpreters in the same process for security reasons) also seems 
>> like a potentially fruitful approach to distributing processing to multiple 
>> cores:
>>    - use threads to perform blocking I/O in parallel
> 
> OTOH, the Twisted approach avoids all the delicate synchronization
> issues that arise when using threads to perform concurrent IO tasks.
> 
> Also, IO is by definition not CPU-intensive, so there is no point in
> distributing IO to multiple cores (and it could even cause a small
> decrease in performance because of inter-CPU communication overhead).

Yeah, I made a mistake. The distinction is whether or not the CPU-intensive 
task is written in C/C++ or Python - threads already work fine for the former, 
but something new is needed for the latter (either better IPC support or 
better in-process multi-interpreter support that uses an interpreter-specific 
lock for interpreter-specific data structures, reserving the GIL for shared 
state).

Cheers,
Nick.



-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to