[Fwd: Re: Sending slots to main thread]



Sorry for the delay in the answer, but yesterday I only send the answer
message to Paul Davis. I pressed the wrong button.

Sorry.


Joaquim Duran


-------- Missatge original --------
Assumpte: Re: Sending slots to main thread
Data: Mon, 27 Aug 2007 16:27:35 +0200
De: Joaquim Duran <joaquinduran adtelecom es>
Respon a: joaquinduran adtelecom es
Empresa: AD Telecom
A: paul linuxaudiosystems com
Referències: <46D2B629 6050003 adtelecom es>
<1188217101 10370 32 camel localhost localdomain>

En/na Paul Davis ha escrit:
> On Mon, 2007-08-27 at 13:31 +0200, Joaquim Duran wrote:
>> Dear all,
>>
>> I've been testing the thread related objects of gtkmm. I've seen that it
>> is possible to connect a slot to a dispatcher to send the slot to the
>> main thread. The problem is that only one type of slot could be attached
>> to the Dispatcher.
>>
>> IS there any way to send any type of slot to the main thread? The
>> behavior should the same or very close to ThreadPool.
> 
> sigc::bind is your friend here. you might also find using
> sigc::hide_return useful too.
>


Yes, I know that, but,.... in the Dispatcher you are able to connect a
signal with parameters to it only once and that signal can be emitted as
many times as needed (always with the same parameters values).

Meanwhile, the in the Thread pool, each time a slot is sent, different
parameters values could be used.

Perhaps a message queue is needed to send slots with different
parameters values to main thread, and notify to main thread using a
signal in a Dispatcher?

Joaquim Duran




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