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 Simon Schampijer <simon@laptop.org>2012-10-16 18:42:51 (GMT)
commit6764882a44c4d2f0dec414f48ea3588e4de69f7b (patch)
tree542b9bd7fcc536338ccd8a1b3cd17911260085c0 /bin
parentfdd9d8048ed51fa4976703d4d9201cc11552d64e (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>
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 5cdc028..e465d75 100755
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -35,6 +35,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
@@ -51,6 +52,7 @@ try:
except ImportError:
logging.debug('Could not load xklavier for keyboard configuration')
+GLib.threads_init()
Gdk.threads_init()
dbus.glib.threads_init()