GNOME Bugzilla – Bug 459555
gdk_threads_add_* docs question
Last modified: 2015-05-10 20:00:40 UTC
The docs of gdk_threads_add_*_full don't state whether the gdk lock is also held during the invocation of the provided GDestroyNotify function. From reading the code I see that they don't; so that should be documented to make it clear that you need to do that yourself if necessary.
unfortunately the glib main loop mechanism allows sources to be destroyed during dispatching (e.g. when a timeout/idler is removed while the gdk lock is being held) and also after all GSources have been dispatched (e.g. due to a reference count which was held across dispatch()). so whether the gdk lock is being held during destroy is unpredictable.
Discussion started on a possible remedy here: http://mail.gnome.org/archives/gtk-devel-list/2007-August/msg00081.html
no activity in a long time here.