From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2013-11-11 12:56:34
|
https://bugzilla.gnome.org/show_bug.cgi?id=711839 gnome-perl | Glib | unspecified --- Comment #1 from Emmanuele Bassi (:ebassi) <eb...@gm...> 2013-11-11 12:56:22 UTC --- Created an attachment (id=259554) View: https://bugzilla.gnome.org/attachment.cgi?id=259554 Review: https://bugzilla.gnome.org/review?bug=711839&attachment=259554 Add Glib::MainContext::invoke() wrapper Modern GLib is trying to phase out GMainLoop in favour of GMainContext, especially when it comes to threads usage. The invoke() method of GMainContext is used in two cases: • if the code is using (native) threads with multiple main contexts and wishes to invoke a callback function in the correct context, which is the case with GIO • if the code is using an API that explicitly breaks when used from multiple threads, and requires that each callback is invoked a specific main context, which is the case of GTK+ The usual way to perform this operation before the introduction of the g_main_context_invoke() function was to schedule an idle source; this requires setting up idle sources for specific contexts (thus foregoing all the convenience API). Given that the documentation for the libraries based on GLib is starting to point in the direction of g_main_context_invoke(), the Perl bindins should provide a wrapper for this function. -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |