On Fri, May 3, 2013 at 9:41 AM, Joseph Spadavecchia <[email protected]> wrote: [...] > Is this a bug or is evthread_use_pthreads() required for multiple -- > isolated -- threads to use evdns?
Under the current architecture, you do indeed need to initialize threading for any resource to be shared across threads, which *does* include the PRNG. Unfortunately, evdns does not currently have an option like EVENT_BASE_FLAG_NOLOCK, so once threading is initialized, every evdns_base is going to have a lock that it doesn't need. I'd be open to work to change this, including by: * Letting the PRNG be thread-specific. * Adding an option to make the PRNG be evdns_base-specific * Adding a flag like EVENT_BASE_FLAG_NOLOCK for evdns_base initialization. Other thoughts? yrs, -- Nick *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
