threading and multicores, pros and cons

garrickp at gmail.com garrickp at gmail.com
Wed Feb 14 10:24:45 EST 2007


On Feb 13, 9:07 pm, Maric Michaud <m... at aristote.info> wrote:
> I've heard of a bunch of arguments to defend python's choice of GIL, but I'm
> not quite sure of their technical background, nor what is really important
> and what is not. These discussions often end in a prudent "python has made a
> choice among others"... which is not really convincing.

Well, INAG (I'm not a Guru), but we recently had training from a Guru.
When we brought up this question, his response was fairly simple.
Paraphrased for inaccuracy:

"Some time back, a group did remove the GIL from the python core, and
implemented locks on the core code to make it threadsafe. Well, the
problem was that while it worked, the necessary locks it made single
threaded code take significantly longer to execute."

He then proceeded to show us how to achieve the same effect
(multithreading python for use on multi-core computers) using popen2
and stdio pipes.

FWIW, ~G




More information about the Python-list mailing list