Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3277

Re: Questions about GIL and web services from a n00b

Subject Re: Questions about GIL and web services from a n00b
From Tim Wintle <tim.wintle@teamrubber.com>
References <4DA8734C.1080706@WindsorCircle.com>
Organization Team Rubber
Date 2011-04-15 18:03 +0100
Newsgroups comp.lang.python
Message-ID <mailman.400.1302887972.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, 2011-04-15 at 12:33 -0400, Chris H wrote:
> 
> 1. Are you sure you want to use python because threading is not good
> due to the Global Lock (GIL)?  Is this really an issue for
> multi-threaded web services as seems to be indicated by the articles
> from a Google search?  If not, how do you avoid this issue in a
> multi-threaded process to take advantage of all the CPU cores
> available?

Is the limiting factor CPU?

If it isn't (i.e. you're blocking on IO to/from a web service) then the
GIL won't get in your way.

If it is, then run as many parallel *processes* as you have cores/CPUs
(assuming you're designing an application that can have multiple
instances running in parallel so that you can run over multiple servers
anyway).

Tim Wintle

Back to comp.lang.python | Previous | Next | Find similar


Thread

Re: Questions about GIL and web services from a n00b Tim Wintle <tim.wintle@teamrubber.com> - 2011-04-15 18:03 +0100

csiph-web