[Python-ideas] The async API of the future: Reactors
trent at snakebite.org
Sat Oct 13 03:11:20 CEST 2012
On Fri, Oct 12, 2012 at 03:49:36PM -0700, Guido van Rossum wrote:
> [Responding to yet another message in the original thread]
> On Thu, Oct 11, 2012 at 9:45 PM, Trent Nelson <trent at snakebite.org> wrote:
> > It's the best way to do it. There should really be a libevent-type
> > library (libiocp?) that leverages IOCP where possible, and fakes it
> > when not using a half-sync/half-async pattern with threads and epoll
> > or kqueue on Linux and FreeBSD, falling back to processes and poll
> > on everything else (NetBSD, OpenBSD and HP-UX (the former two not
> > having robust-enough pthread implementations, the latter not having
> > anything better than select or poll)).
> In which category does OS X fall?
Oh, how'd I forget about OS X! At the worst, it falls into the
FreeBSD kqueue camp, having both a) kqueue and b) a performant
However, with the recent advent of Grand Central Dispatch, it's
actually on par with Windows' IOCP+threadpool offerings, which is
pretty cool. (And apparently there are GCD ports in the works for
Solaris, Linux and... Windows?!)
Will reply to the other questions in a separate response.
More information about the Python-ideas