简体   繁体   中英

What library implements asynchronous processing of messages?

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.

看看Boost.Asio

You can have a look at the ACE framework

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

my2c

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM