Re: [sigc] How does std::function<> work with libsigc++



On Fri, 09 Aug 2013 13:09:29 +0200
Murray Cumming <murrayc murrayc com> wrote:
[snip]

Can you give us an example of when you would not want the slot to be
tracked?

When you want more than one thread to create slots on a trackable object
using sigc::mem_fun(), as this is not thread safe.

At present you have to resort (if using C++11) to passing a lambda
expression or the return value of std::bind to a slot object to
side-step trackability (and there seems to be a name clash when using
std::bind and sigc::slot together at present which I do not think has
been fixed yet, which just leaves you with a lambda expression).

Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]