I read in a previous thread that it's possible to use evhttp across multiple threads by creating an event_base per thread, and an evhttp instance per thread by calling evhttp_new.
Am I correct in assuming that you create one socket fd and initialize it, then pass it to each thread's evhttp via evhttp_accept_socket? I tried this, then put each thread into an event loop by calling event_base_loop, but had the following problem: After a few successful connections, libevent starts handing out warnings about failed accepts. It seems that when a client tries to connect, the event is being handled by multiple threads - one is succesfully grabbing the accept() and others are bailing out. I'm most familiar with a single thread handling all the accepts() then handing the new fd to a worker thread - but evhttp seems structured to have multiple threads calling accept on the same fd. Is this my problem, or a red herring? Erik _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users