Re: to many invalidate_rect calls freezes window



Chris Vine wrote:
> Note that sigc slots/signals are just an encapsulation of a callback
> mechanism.  slots execute in the thread which emits the signal. (The
> same applies to GObject signals.)
hm i didn't know that. this is the problem i think, i will try using a
Glib::Dispatcher instead.
perhaps someone could explain how the Dispatcher works, not in code but
what happens behind the scenes. when i emit the dispatcher in the worker
thread, when does the connected function in the main thread get
executed. will it be called by the signal handling in the gtk main loop?

the only problem is that i cannot pass arguments over a Glib::Dispatcher
neither return values are supported (of course since the dispatcher is
asynchronously). I also need to pass the content of variables from one
thread to the other.
What about a SigCX::ThreadTunnel?

thanks a lot so far

buergi



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