diff options
author | Daniel Drake <dsd@laptop.org> | 2012-10-13 22:12:24 (GMT) |
---|---|---|
committer | Ajay Garg <ajay@activitycentral.com> | 2012-10-30 06:36:32 (GMT) |
commit | 8072fa2dfdfd01b651eccfb9cde4dc1fba20de1f (patch) | |
tree | b41ce17056537417c6aba04da14b3b542630b695 /bin | |
parent | f7db36b1786a444e5fedd218b52ac6e9ae79cf16 (diff) |
sugar-session: initialize threading via glib
sugar extensions that use threads such as OLPC's software updater
require that threads have been properly initialised before the
main loop is ran.
For pygobject3, GLib.threads_init() must be called before doing
the same for Gdk, otherwise the threads hang in random places
for long periods of time. See e.g.
http://stackoverflow.com/questions/11070263/webkit-threads-with-pygobject-on-gtk3
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
Signed-off-by: Ajay Garg <ajay@activitycentral.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/sugar-session | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/sugar-session b/bin/sugar-session index 0977b1f..612a7ce 100755 --- a/bin/sugar-session +++ b/bin/sugar-session @@ -36,6 +36,7 @@ import gettext import logging import sys +from gi.repository import GLib from gi.repository import GConf from gi.repository import Gtk from gi.repository import Gdk @@ -56,6 +57,7 @@ try: except ImportError: logging.debug('Could not load xklavier for keyboard configuration') +GLib.threads_init() Gdk.threads_init() dbus.glib.threads_init() |