Search code examples
c++multithreadingactorsignals-slots

Recommendation for a C++ signals/actor framework


I have the following requirements:

  • A signal emitted from one thread can be landed on a slot from another thread. (cross-threaded) In case of actor model: a passed message from one actor (running on a separate thread, of course) can be received by another actor (pretty obvious I know).
  • A signal can pass user defined data with it.
  • Speed (should be very fast).
  • Lightweight.
  • Portable (target iOS).
  • Easy to integrate into a project (preferably a single header file).
  • Easy to use.

Basically, that's all. As you can see, the actor framework will fit as well (message passing instead of emitting a signal).

P.S. Why two minuses, People? :) Ohhhh very friendly, now it's 8 - that's better! :)


Solution

  • Boost.Signals2 is at least most of what you want: http://www.boost.org/doc/libs/release/doc/html/signals2.html