Re: Sending slots to main thread (implemented)
- From: Chris Vine <chris cvine freeserve co uk>
- To: joaquinduran adtelecom es
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Sending slots to main thread (implemented)
- Date: Sat, 01 Sep 2007 15:45:28 +0100
On Sat, 2007-09-01 at 15:52 +0200, joaquinduran adtelecom es wrote:
> Note on Dispatcher class, I've taken a closer look to its interface. I've seen that the
> connect member function returns a sigc::connection object. this means that the signal could be
> disconnected from dispatcher and another one be connected.
>
> (not tested)
> sigc::conecttion connect = dispatcher.connect(sigc::mem_func(*this, example::func1param,
> "param1"));
> dispatcher.emit();
> connect.disconnect();
> sigc::conecttion connect = dispatcher.connect(sigc::mem_func(*this, example::secondfunction,
> "second parameter"));
> dispatcher.emit();
I am not entirely sure what you are proposing, but the point you will
need to bear in mind is that because libsigc++ does not do its own
locking/synchronisation, with Glib::Dispatcher the same thread has to
connect, disconnect and execute the slot. Any other thread can emit of
course (which is the point of the having a Glib::Dispatcher class) -
Glib::Dispatcher::emit() does not invoke any libsigc++ functions.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]