Re: GTK deadlock in gtk_main



2010/8/3 Tomas Soltys <tomas soltys range-software com>

All right, so at the end it was my bug :)

Thank you all for your explanations.


Note also that part of the magic of gdk_threads_enter/leave that you can use
on unix to use gtk functions in subthreads does not work on win32 (and also
on OSX).

I had really some bad headaches trying to use it in a cross platform way
then I gave up and redesigned the application to use a lot of small "idle
functions" executed when needed (returning false they are executed only
once, and you can queue multiple idle functions also from different threads
in a safe way since the idle function queue is protected by a lock) from the
subthreads to update the GUI so that every GTK function is called on the
main thread. This works quite well and does not require locking at all.

-- 
Bye,
 Gabry



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