On Sun, Jan 04, 2015 at 12:00:39AM +0300, Azat Khuzhin wrote: > On Sat, Jan 03, 2015 at 08:22:52PM +0000, Gerry Sweeney wrote: > > Hi Azat, > > > > Ok thanks. You are right, there is not much different in the two patterns, > > they are almost the same apart from the first pattern the request is served > > as soon as there is a free thread to serve it and the second is essentially > > an open connection that can have data sent down it at any time by another > > thread. > > > > first pattern -> libevhtp > > As for the second pattern, am I understand correct, that the main goal > of it is is nhave separate thread for non-idle connection? > IOW we can't reuse that separate thread to do some job for other > connections. > > If so, I don't think that this is AIO's task, *but* > all you need is just move handling of this request into separate > thread, and a brief look at libevhtp shows me that it is pretty easy to > add.
You can do anything with the per-thread event_base, it is not one thread per-connection. You can even add your own stuff to it. This is a deferral pattern. *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
