Re: gtk & threads



> Is gtk thread safe?
> I am trying to figure out how to get past gtk's "cant refresh while in a
> function" problem.
> Using threads, I think, would be the best way around it, but I dont see
> anything on gtk.org about thread safety.

>From http://www.gtk.org/faq/gtkfaq-5.html#ss5.2

-- snip --
5.2 Is GTK+ thread safe? How do I write multi-threaded GTK+ applications? 

   The GLib library can be used in a thread-safe mode by calling
   g_thread_init() before making any other GLib calls. In this mode GLib
   automatically locks all internal data structures as needed. This does
   not mean that two threads can simultaneously access, for example, a
   single hash table, but they can access two different hash tables
   simultaneously. If two different threads need to access the same hash
   table, the application is responsible for locking itself. 
-- snip --

Jason.



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