Wouter Wijngaards wrote:
Also signal handling suffers from
thread-unsafety. As well as event_loop_exit which is thread-unsafe and
event_init() itself which is thread unsafe. Anyway, I have also sent a
patch to Niels (last week), which solves your problem and all other
problems. It also includes regression tests. He did note that he
received the message.
I hope your patch or a fix is included quickly...
My solution opens the two file descriptors for every event_base, but
also closes them on event_base_free. So that every event_base is capable
of handling signals. So, my solution also solves your problem, I think.

I wonder if opening 2 FD per thread is necessary...
Having 100 threads doing IO would need at least 300 sockets...
Saving FD is not a bad idea...

If only one thread handles signals, this will work. But also it is
possible to have multiple event_bases in one thread and switch around
which one you use, that one will handle signals for you :-)

This could be a good idea even if i have not yet the need of using multiple eventbases per thread...

Thanks again,

Cya,
Max


_______________________________________________
Libevent-users mailing list
[email protected]
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to