[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Is evthread_use_pthreads required for isolated evdns event_bases?



Hi Nick.

On Fri, 3 May 2013 11:47:13 -0400, Nick Mathewson <nickm@xxxxxxxxxxxxx>
wrote:
[...]
> Under the current architecture, you do indeed need to initialize
> threading for any resource to be shared across threads, which *does*
> include the PRNG.

Oh, I didn't know there was a shared PRNG in evdns.  I thought evdns_base
behaves like event_base, i.e., that they shared nothing by default.

[...]
> 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.

Thanks.  That would work for me.

[...]
>
> Other thoughts?

My only thought is perhaps the PRNG should be per evdns_base by default.

Oh, and if you could use some help, then I'd be happy to submit a patch.

Many thanks.
*Joe

***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.