Re: Weird problems: C library programs crashing in combination with GTK UI




On Wed, 2008-01-23 at 10:18 +1100, Michael Lamothe wrote:
Hi,

Alternatively, you can use the new gdk_threads_add_timeout() available
in GTK 2.12.  It's a GDK thread safe drop-in-replacement for
g_timeout_add().

g_timeout_add() is thread safe provided that, if any GDK/GTK+ functions
are called in the callback, the GDK lock is acquired with
gdk_threads_enter() before those calls are made.
gtk_threads_add_timeout() avoids lock contention within the callback (it
is entered with the lock already held), but I don't think that was the
OP's problem.

Chris





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