Actors implementation built on C ++ 0x stream standard

I'm a little disappointed that the C++0x concurrency standard does not seem to have built-in support for the Actors model for messaging.

Is there any support for this that I miss? Maybe something in futures / promises? Is there any strong community effort to build a standard de facto implementation on top of Threading C++0x ?

+4
source share
1 answer

Currently, I have found two possible solutions: Theron and libcppa . Both of them are based on Boost streams and therefore should be easily portable to C ++ 11 streams. Both of them are developed by people.

Mostly because I found it first, and because it has very good documentation, I went ahead and tried Theron , and it works very well. My test application was not particularly suitable for Actors, and as many Actors as hardware cores were required, but I got about 4.5 times acceleration with 6 threads on 6 cores and 6 times acceleration with 12 threads on 6 cores with hyperthread . Pretty good, and it only took a few hours to work, and I didn't have to touch threads or mutexes at all. I also implemented a version that spawned thousands of participants, and it worked well too, although it was much slower for this implementation.

The only drawbacks that I found are that it does not work for interprocess / machine / distributed applications, and currently it is a bit oriented to Windows (although I did not work with a Mac and Linux machine without any particular problems).

I also tried libcppa and got a toy example that worked without any problems. The API seems a little less stable, and the documentation was scarce at the time, but I was told that it was recently focused.

+4
source

Source: https://habr.com/ru/post/1369220/


All Articles