On Sun, Apr 17, 2011 at 12:44 AM, Aahz <a...@pythoncraft.com> wrote:
> In article <e6008cc8-50f0-4d78-be78-ec6e73b97...@22g2000prx.googlegroups.com>,
> Raymond Hettinger  <pyt...@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 agree; user interaction is effectively I/O on, usually, some sort of
event queue that collects from a variety of sources; with the
specialty that, in some GUI environments, the process's first thread
is somehow "special". But ultimately it's still a "worker thread" /
"interaction thread" model, which is quite a good one. The interaction
thread spends most of its time waiting for the user, maybe waiting for
STDIN, maybe waiting for a GUI event, maybe waiting on some I/O device
(TCP socket comes to mind).

Chris Angelico
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to