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 think that "limited scaling" needs to be defined, too; CherryPy
performs pretty well, and the blocking model does simplify development.

One problem that my company has run into with threading is that it's not
always obvious where you'll hit GIL blocks.  For example, one would
think that pickle.loads() releases the GIL, but it doesn't; you need to
use pickle.load() (and cStringIO if you want to do it in memory).
-- 
Aahz (a...@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"At Resolver we've found it useful to short-circuit any doubt and just        
refer to comments in code as 'lies'. :-)"
--Michael Foord paraphrases Christian Muirhead on python-dev, 2009-03-22
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to