Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2012-10-13 22:12:24 (GMT)
committer Ajay Garg <ajay@activitycentral.com>2012-10-30 06:36:32 (GMT)
commit8072fa2dfdfd01b651eccfb9cde4dc1fba20de1f (patch)
treeb41ce17056537417c6aba04da14b3b542630b695 /bin
parentf7db36b1786a444e5fedd218b52ac6e9ae79cf16 (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-xbin/sugar-session2
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()