Boost Synapse


(Note: Boost Synapse is not part of Boost. Please post questions and suggestions on the Boost Developers Mailing List).

Boost Synapse is a C++ signal programming library. It can be used to define communication channels between many different entities in a dynamic object environment. Sometimes such libraries are part of a larger API, but independent alternatives like Boost Signals 2 or libsigc++ are available as well.

The advantage of Boost Synapse over other similar libraries is that it is non-intrusive: it allows any object of any type whatsoever to be used as a signal emitter.



Multi-threading support

Most of the Boost Synapse functionality is implemented using thread-local data structures, so by default signals are propagated independently within each user thread. In addition, thread-local queues can be created in any thread, to synchronously receive queued signals emitted asynchronously by other threads; see Interthread Communication Support.

Comparison with Boost.Signals2

If you're familiar with Boost.Signals2 and want to understand how Synapse is different, to read about the design tradeoffs in each library, or to learn about Synapse's special features (e.g. meta signals), see Comparison between Boost.Signals2 and Synapse.


See this github repo.