Re: Sending slots to main thread (implemented)
- From: Joaquim Duran <joaquinduran adtelecom es>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Sending slots to main thread (implemented)
- Date: Mon, 03 Sep 2007 14:14:16 +0200
En/na Chris Vine ha escrit:
> 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.
>
This was a little of BainStorming with the Dispatcher interface. Nothing
more.
Thanks and Best Regards,
Joaquim Duran
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]