Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3327
| From | aahz@pythoncraft.com (Aahz) |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Questions about GIL and web services from a n00b |
| Date | 2011-04-16 07:44 -0700 |
| Organization | The Cat & Dragon |
| Message-ID | <ioca10$hu8$1@panix5.panix.com> (permalink) |
| References | <4DA8734C.1080706@WindsorCircle.com> <1302887012.27269.2.camel@tim-laptop> <mailman.399.1302887394.9059.python-list@python.org> <e6008cc8-50f0-4d78-be78-ec6e73b974e9@22g2000prx.googlegroups.com> |
In article <e6008cc8-50f0-4d78-be78-ec6e73b974e9@22g2000prx.googlegroups.com>, Raymond Hettinger <python@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 (aahz@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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Re: Questions about GIL and web services from a n00b Chris H <chris.humphres@windsorcircle.com> - 2011-04-15 13:09 -0400
Re: Questions about GIL and web services from a n00b Raymond Hettinger <python@rcn.com> - 2011-04-15 18:05 -0700
Re: Questions about GIL and web services from a n00b David Cournapeau <cournape@gmail.com> - 2011-04-16 11:59 +0900
Re: Questions about GIL and web services from a n00b sturlamolden <sturlamolden@yahoo.no> - 2011-04-17 07:48 -0700
Re: Questions about GIL and web services from a n00b aahz@pythoncraft.com (Aahz) - 2011-04-16 07:44 -0700
Re: Questions about GIL and web services from a n00b Chris Angelico <rosuav@gmail.com> - 2011-04-17 02:04 +1000
Re: Questions about GIL and web services from a n00b Jean-Paul Calderone <calderone.jeanpaul@gmail.com> - 2011-04-16 13:53 -0700
Re: Questions about GIL and web services from a n00b Michael Torrie <torriem@gmail.com> - 2011-04-16 16:10 -0600
Re: Questions about GIL and web services from a n00b sturlamolden <sturlamolden@yahoo.no> - 2011-04-17 07:50 -0700
csiph-web