
On Fri, Dec 2, 2016 at 11:00 AM, Nat Goodspeed
On Fri, Dec 2, 2016 at 1:31 PM, Emil Dotchevski
wrote: See http://zajo.github.io/boost-synapse/questions_and_answers.html.
Thanks.
In Synapse the emitter is simply a "meeting place": using emit<foo>(p) to emit the signal foo from the object p will call any functions that were connected by connect<foo>(p,f), where p is simply (the address of) any object (of any type whatsoever) you have in your program.
So, the library contains something like a thread_local unordered_map whose keys are arbitrary pointers?
Unspecified implementation details, but yes -- plus (optional) lifetime management of connections through weak_ptr, so that the connection expires when the emitter and/or the target expire. And, there is support for interthread communication: http://zajo.github.io/boost-synapse/interthread_communication_support.html. Thanks, Emil