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).