On Feb 21, 2014, at 9:03 AM, Jeffrey Walton <[email protected]> wrote:
> 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)? I wouldn't necessarily use it in those cases, but one could do so > > 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 use it for this case - any time I need a separate progress thread > > (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 [email protected] with > unsubscribe libevent-users in the body. *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
