[Python-ideas] An alternate approach to async IO
Antoine Pitrou
solipsis at pitrou.net
Wed Nov 28 08:02:58 CET 2012
On Tue, 27 Nov 2012 19:15:14 -0500
Trent Nelson <trent at snakebite.org> wrote:
> On Tue, Nov 27, 2012 at 03:50:34PM -0800, Guido van Rossum wrote:
> > 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.
>
> Right, that's why I proposed using non-Python types as buffers
> whilst in the background IO threads.
Trent, once again, please read about Py_buffer.
Thanks
Antoine.
More information about the Python-ideas
mailing list