Looking for a C or C++ library providing a functionality similar to Google Go's channels -
... for use in a multithreaded network server.
Threads I want to pass data between multiple threads. Currently I am using sockets, with the master thread working on selection () and block the worker on recw (), although I think that perhaps more to manage this task in C ++ There are advanced or prepaid methods.
I will be a worker waiting in the thread pool.
Then waiting for the master to select (reads and writes both).
As the data arrives, the master thread adds a job to the pool. As each job is added a thread awakens the job and returns to the pool. This way you do not stop recv () and threads on specific ports, and a fixed set of child threads can handle all incoming traffic.
Currentl Libs that support this functionality include:
- ACE:
- Poco:
Comments
Post a Comment