views:

71

answers:

2

Help find a library that implements:

1) Publisher-Subscribers. Publisher sends (SendMessage - not WinAPI function) the message, not knowing how many subscribers will receive it, maybe 0.

2) Asynchronously. If there is a free flow, the subscriber (s) must start in parallel with the code after the SendMessage.

3) Smart pointers to parameters. The parameter for different message can have different type, created in the heap and is available to all subscribers to read. After all subscribers have worked, the memory allocated for the parameters is released.

4) The pool of threads. Thread is not removed after processing the message, and wait a new message.

5) Optional: Priorities, several threads pools and mapping messages to different pools.

A: 

Have a look at Boost.Asio

Alexander Poluektov
A: 

You can have a look at the ACE framework

It might be a bit overkill, but pretty good ...

my2c
neuro