|
Boost : |
Subject: Re: [boost] Synapse library review starts today December 2
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2016-12-03 02:02:22
On Fri, Dec 2, 2016 at 11:00 AM, Nat Goodspeed <nat_at_[hidden]> wrote:
> On Fri, Dec 2, 2016 at 1:31 PM, Emil Dotchevski
> <emildotchevski_at_[hidden]> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk