mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
Remove the threads locking in the dispatchers destruction notification
The GLib main loop allows destroying sources while still in the dispatcher function, so whether the Clutter threading lock is being held or not is actually unpredictable by the library. This might be fixed in GLib, so we just do what GTK+ does for the time being and wait. See bug: http://bugzilla.gnome.org/show_bug.cgi?id=459555
This commit is contained in:
parent
0e90acfdeb
commit
fa7eb4e5a8
@ -549,13 +549,15 @@ clutter_threads_dispatch_free (gpointer data)
|
||||
{
|
||||
ClutterThreadsDispatch *dispatch = data;
|
||||
|
||||
clutter_threads_enter ();
|
||||
|
||||
/* XXX - we cannot hold the thread lock here because the main loop
|
||||
* might destroy a source while still in the dispatcher function; so
|
||||
* knowing whether the lock is being held or not is not known a priori.
|
||||
*
|
||||
* see bug: http://bugzilla.gnome.org/show_bug.cgi?id=459555
|
||||
*/
|
||||
if (dispatch->notify)
|
||||
dispatch->notify (dispatch->data);
|
||||
|
||||
clutter_threads_leave ();
|
||||
|
||||
g_slice_free (ClutterThreadsDispatch, dispatch);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user