Re: [sigc] How does std::function<> work with libsigc++
- From: Chris Vine <chris cvine freeserve co uk>
- To: Murray Cumming <murrayc murrayc com>
- Cc: libsigc-list gnome org
- Subject: Re: [sigc] How does std::function<> work with libsigc++
- Date: Fri, 9 Aug 2013 14:52:45 +0100
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]