Re: Deadlock/Freeze



Matteo Landi wrote:
From the FAQ entry [1] it seems I need to enter/leave threads inside each
timeout callback. Could the procedure described be a valid solution
for my problem?

Yes I believe you need to call enter/leave around calls to any gtk or
gdk call inside the callback.

You might also consider the g_idle_add pattern and have threads use this
mechanisms to run callbacks in the main GUI thread, avoiding the locking
issues entirely and also making your program more cross-platform.

http://irrepupavel.com/documents/gtk/gtk_threads.html explains this
pattern somewhat.



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