开发者

What library implements asynchronous processing of messages?

开发者 https://www.devze.com 2022-12-21 00:28 出处:网络
Help find a library that implements: 1) Pu开发者_开发知识库blisher-Subscribers. Publisher sends (SendMessage - not WinAPI function) the message, not knowing how many subscribers will receive it, mayb

Help find a library that implements:

1) Pu开发者_开发知识库blisher-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.


Have a look at Boost.Asio


You can have a look at the ACE framework

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

my2c
0

精彩评论

暂无评论...
验证码 换一张
取 消