GNOME Bugzilla – Bug 703445
GstGLWindow's send_message is not reentrant
Last modified: 2013-07-02 20:35:26 UTC
Being reentrant allows us to send messages from the GL thread and allows us to remove the _thread () variants of the API. Using GMainContext for the window loop would allow us to do this. See g_main_context_invoke.
Using a GMainContext/GMainLoop for all the loops would also simplify a lot of code probably. Why exactly is send_message not reentrant current?
(In reply to comment #1) > Using a GMainContext/GMainLoop for all the loops would also simplify a lot of > code probably. > > Why exactly is send_message not reentrant current? No idea. I got it like that :).
Created attachment 248206 [details] [review] wayland: make reentrant
Ah the question was what exactly the problem is... the patch answers that :) commit b40b78ccb57bc29e72ac739114ca5256d12e57ff Author: Matthew Waters <ystreet00@gmail.com> Date: Tue Jul 2 18:33:42 2013 +1000 wayland: make reentrant https://bugzilla.gnome.org/show_bug.cgi?id=703445
There are still the other backends to consider (x11, win32, cocoa). At the moment I'm working on the x11 one.
Created attachment 248213 [details] [review] x11: use GMainContext to be reentrant
Created attachment 248217 [details] [review] don't call NULL pointers Side Note: The Cocoa and Win32 backends are already reentrant but do not use GMainContext/GMainLoop.
Also makes the code *much* more readable and simpler :) commit 47b5ff7b35decdd54194994b35927aebcb74882f Author: Matthew Waters <ystreet00@gmail.com> Date: Tue Jul 2 22:45:08 2013 +1000 window: don't call a NULL destroy function commit 9c4cd9abcfdaf75c8b223af8169e1a97aad47b01 Author: Matthew Waters <ystreet00@gmail.com> Date: Tue Jul 2 22:06:03 2013 +1000 x11: use GMainContext/GMainLoop allows us to be reentrant https://bugzilla.gnome.org/show_bug.cgi?id=703445