Questions about GIL and web services from a n00b

Michael Torrie torriem at gmail.com
Sat Apr 16 18:10:04 EDT 2011


On 04/16/2011 02:53 PM, Jean-Paul Calderone wrote:
> On Apr 16, 10:44 am, a... at pythoncraft.com (Aahz) wrote:
>> In article <e6008cc8-50f0-4d78-be78-ec6e73b97... at 22g2000prx.googlegroups.com>,
>> Raymond Hettinger  <pyt... at rcn.com> wrote:
>>
>>
>>
>>> Threading is really only an answer if you need to share data between
>>> threads, if you only have limited scaling needs, and are I/O bound
>>> rather than CPU bound
>>
>> Threads are also useful for user interaction (i.e. GUI apps).  
>>
> 
> I suppose that's why most GUI toolkits use a multithreaded model.

Many GUI toolkits are single-threaded.  And in fact with GTK and MFC you
can't (or shouldn't) call GUI calls from a thread other than the main
GUI thread.  That's not to say GUI programs don't use threads and put
the GUI it its own thread.  But GUI toolkits are often *not*
multithreaded.  They are, however, often asynchronous, which is often
more cost-effective than multi-threaded.



More information about the Python-list mailing list