[Python-ideas] An alternate approach to async IO

Antoine Pitrou solipsis at pitrou.net
Thu Nov 29 10:16:54 CET 2012


Le Wed, 28 Nov 2012 15:18:19 -0500,
Trent Nelson <trent at snakebite.org> a écrit :
> > 
> > That api is fairly similar to what is in the proactor branch of
> > tulip where you can write
> > 
> >      for event in proactor.poll(timeout):
> >          # process event
> > 
> > But why use a use a thread pool just to take items from one thread
> > safe (FIFO) queue and put them onto another thread safe (LIFO)
> > queue?
> 
>     I'm not sure how "thread pool" got all the focus suddenly.  That's
>     just an implementation detail.  The key thing I'm proposing is
> that we reduce the time involved in processing incoming IO requests.

At this point, I propose you start writing some code and come back with
benchmark numbers, before claiming that your proposal improves
performance at all. Further speculating about thread pools, async APIs
and whatnot sounds completely useless to me.

Regards

Antoine.





More information about the Python-ideas mailing list