[Python-ideas] An alternate approach to async IO

Sturla Molden sturla at molden.no
Wed Nov 28 01:07:03 CET 2012

Den 28. nov. 2012 kl. 00:50 skrev Guido van Rossum <guido at python.org>:

> On Tue, Nov 27, 2012 at 3:33 PM, Sturla Molden <sturla at molden.no> wrote:
>> Den 27. nov. 2012 kl. 23:36 skrev Trent Nelson <trent at snakebite.org>:
>>>   Right, but with things like interlocked lists, you can make that
>>>   CPython|background_IO synchronization barrier much more performant
>>>   than relying on GIL acquisition.
>> You always need the GIL to call back to Python.  You don't need it for anything else.
> You also need it for any use of an object, even INCREF, unless you
> know no other thread yet knows about it.


But you don't need it to call Windows API functions like GetQueuedCompletionStatus, which is what Trent implied.

(Actually, calling GetQueuedCompletionStatus while holding the GIL would probably cause a deadlock.) 


More information about the Python-ideas mailing list