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)

Chris
--
=[ http://www.starforge.co.uk/ ]===[ Explorer2260 Lead Designer and Coder. ]
=[ Public key: ]===================[ http://www.starforge.co.uk/pubkey.txt ]
=[ Quod nesciunt eos interficiet. ]




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