[Libevent-users] evdns and multi-threaded environments
Dave Simpson
dave at powerset.com
Thu Oct 4 13:17:41 EDT 2007
I've been using the event_base API to allow several worker threads to run an
event loop. I'd like to use the asynchronous dns from evdns, but from what
I can see, it isn't thread safe. Any thoughts on this?
>From looking at the code, two big changes need to be made:
1) allow API users to specify an event_base for any call that interacts
with the libevent system.
2) move most of the global variables/state into a struct and provide
an init call that returns the struct as a handle that can later be
passed into most of the API calls. That version of init could take
the event_base to be used.
Any thoughts on this?
-Dave
More information about the Libevent-users
mailing list