[Python-ideas] An alternate approach to async IO

Sturla Molden sturla at molden.no
Wed Nov 28 00:59:43 CET 2012

Den 28. nov. 2012 kl. 00:41 skrev Trent Nelson <trent at snakebite.org>:

>    Right, you *currently* need the GIL to call back to Python.

You need the GIL to access the CPython interpreter. You did not suggest anything that will change that.

>    I'm proposing an alternate approach that avoids the GIL.  On
>    Windows, it would be via interlocked lists.

No, you just misunderstood how the GIL works.

You seem to think the GIL serializes Python threads. But what it serializes is access to the CPython interpreter.

When Python threads process data in C land they don't need the GIL and can run freely.


More information about the Python-ideas mailing list