i have a few questions regarding libevent2 and its multithread support.
Does libevent support multiple Threads? What i would like to achieve is something like this:
Is it possible to do s.th like this with libevent? Or are there any other approaches to support multiple cores?
Thank you very much
If you add evthread_use_pthreads();
you must have -levent_pthreads
Example:
gcc chat.c -o chat -levent -lpthread -levent_pthreads
and:
$> ls /usr/lib/libevent*.a
/usr/lib/libevent.a /usr/lib/libevent_core.a /usr/lib/libevent_extra.a /usr/lib/libevent_openssl.a /usr/lib/libevent_pthreads.a
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With