Re: GObject and threads



Tomasz Jankowski wrote:

Hi!

I have simple question ;) Are gobject's functions: g_object_set () and
g_object_get () threadsafe?

No.

A GObject can be owned by you or gtk+, you must protect it inside
critical sections with mutexes and the like - gobjects that are owned
and accessed by gtk+ will be protected by gtk+ internals _and_ by
the programmer who must remember to call gdk_threads_enter/leave()
at the right times.

Cheers,
                          -Tristan




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