Re: Glib::Dispatcher and data transfer into main loop



Am Sat, 19 Apr 2008 20:33:43 +0200 schrieb klaus triendl:

> Andreas Volz schrieb:
> > Hello,
> > 
> > I'm using a Glib::Dispatcher to dispatch data from a thread into my
> > main loop. This is my code:
> [snip]
> > Any ideas how to solve that problem? I've seen no way to give data
> > to the dispatchSignal() call. So I need a member variable to
> > transfer data from the thread called function to the dispatched
> > function. I could think of a queue that saves all the incoming data
> > from the thread for later use in the dispatched function. Do you
> > think that's the best way to do it? Any other ideas?
> 
> Did you see my post a few days ago about interthread communication
> with sigx?
> The library would solve exactly your problem (and it does indeed put
> the incoming data into a message queue).
> cMan could create a signal to which other threads can connect. The 
> signal can have any number of parameters (up to sigc's arity).

Very interesting! The sigx library seems to be very young. Is it yet
tested on win32?

regards
Andreas


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