Michael Carter wrote:

> I think the proper alternative is to hook into evhttp after the
> connection has already been accepted.

Yes, I think this is the natural approach.

> You would have a single thread
> (acceptor) which accepts connections, and then passes the fd off to a
> worker thread. The worker thread would receive an fd from the acceptor
> thread, and then call evhttp_get_request with the fd as one of the
> arguments.

Why not just use the public interface?  Register a generic callback that feeds
the evhttp_request structure (that it gets as one of its arguments) into a
work queue, and let the worker threads pull the structure back out of the
queue and use it to service the request.
-- 
 Matthew Weigel
 hacker
 unique & idempot.ent
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to