Status of Python threading support (GIL removal)?

OdarR Olivier.Darge at
Fri Jun 19 17:51:04 EDT 2009

On 19 juin, 21:41, Carl Banks <pavlovevide... at> wrote:
> He's saying that if your code involves extensions written in C that
> release the GIL, the C thread can run on a different core than the
> Python-thread at the same time.  The GIL is only required for Python
> code, and C code that uses the Python API.  C code that spends a big
> hunk of time not using any Python API (like, as Skip pointed out, a
> matrix multiply) can release the GIL and the thread can run on a
> different core at the same time.

I understand the idea, even if I don't see any examples in the
standard library.
any examples ?

> (Note: I'm not talking about releasing the GIL for I/O operations,
> it's not the same thing.  I'm talking about the ability to run
> computations on multiple cores at the same time, not to block in 50
> threads at the same time.  Multiple cores aren't going to help that
> much in the latter case.)

yes, I also speak about hard computation that could benefit with
multiple cores.

> I wish Pythonistas would be more willing to acknowledge the (few)
> drawbacks of the language (or implementation, in this case) instead of
> all this rationalization.  It's like people here in Los Angeles who
> complain about overcast days.  What, 330 days of sunshine not enough?
> Jesus.  I wish people would just say, "This is a limitation of
> CPython.  There are reasons why it's there, and it helps some people,
> but unfortunately it has drawbacks for others", instead of the typical
> "all u hav 2 do is rite it in C LOL".

I would like to say such thing about my weather...I live in Europe in
a rainy country.


More information about the Python-list mailing list