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

[Libevent-users] std::threads



Hi All,

This is Michael from CMU. I am currently using libevent in our database system (https://github.com/cmu-db/peloton/wiki) to let the cluster nodes to communicate with each other.

I want to ask how can I use multiple std::threads on the same event_base. For example, a server has a event_base. When a new connection coming, the server creates a std::thread with a socket_event, and puts the socket_event into the event_base. If there are ten connections, there are ten std::threads sharing the same event_base. (Each threads has it own socket_event to recv and send data).

Can I implement that? Is there an example?

I appreciate your help!

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