Boost Synapse

Building

Boost Synapse has been formatted to be submitted for a Boost review, so its directory structure follows the common directory structure for Boost libraries—and it's built with Boost Build.

Alternatively, just put connect.cpp and either thread_local_queue.cpp or interthread_stub.cpp into your favorite build system, depending on whether or not your program calls create_thread_local_queue. In addition if your program calls the block function, you also need to compile and link block.cpp.

However, note that if your program only emits signals (that is, it calls emit but it never creates any connections), there is no need to link any .cpp files; that is, boost/synapse/emit.hpp by itself is an independent header-only library. This way libraries that emit signals do not require the user to link Boost Synapse, unless he cares to connect them.

Portability

Currently Boost Synapse requires compiler support for the following C++11 features:

  • Thread-safe dynamic initialization of local static objects;
  • thread_local objects;
  • lambda functions
  • <thread>
  • <atomic>