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

[Libevent-users] When to use multiple bases?



Hi Guys,

Here's another question form the beginer's guide, so please forgive my
ignorance.

I was looking at 'hello-world.c', and I see it uses a single base to
to wait fro incoming connections (via
listener/evconnlistener_new_bind) and and SIGINT (via
signal_event/evsignal_new).

My question is, when is it recommended or appropriate to use a second,
distinct base?

Should a second based be used if a second listener is needed (i.e.,
listen on ports 80 and 443)?

Should a second base be used if a different signal handler is desired
(i.e., SIGKILL or SIGTERM)?

Or should a second base be used if a second thread is used and wants
to wait for events (and not share the other thread's base)?

(I've probably read the answer in Mathewson online book, but I'm not
connecting the dots at the moment).

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