Re: Threads !!!

Soeren Sandmann wrote:

In fact, the glib mainloop has good support for this design. Just use
g_idle_add (function_that_does_updating, data). This way only the
thread that runs the mainloop will do any updating. You don't even
have to worry about locking, as g_idle_add() will do the necessary
locking for you.

Thanks for that, I didn't know about that (I've never written a multithreaded GTK program where several threads need access to the UI)

=[ ]===[ Explorer2260 Lead Designer and Coder. ]
=[ Public key: ]===================[ ]
=[ Quod nesciunt eos interficiet. ]

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