diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2013-10-27 22:09:27 -0700 |
---|---|---|
committer | Simon Feltman <sfeltman@src.gnome.org> | 2013-10-27 22:27:18 -0700 |
commit | 65b8f7bd77474e361c80905ec23de6dbde27970c (patch) | |
tree | a0c203fec24fdee770e8a96553ee7b872f9f735f /gi/__init__.py | |
parent | 57195c9c864bc25521bb3cb98286e6d6f0645652 (diff) | |
download | pygobject-65b8f7bd77474e361c80905ec23de6dbde27970c.tar.gz |
Fix toggleref safety problems by always enabling the GIL
Call PyEval_InitThreads for the base gi module import. This forces the
Python internals create the GIL and always support threading with the
various thread state enter/exit funcs. This is needed since we cannot
predict which GI repositories might accept Python callbacks and run them in
non-Python threads or trigger toggle ref notifications in a thread other
than main.
https://bugzilla.gnome.org/show_bug.cgi?id=709223
Diffstat (limited to 'gi/__init__.py')
-rw-r--r-- | gi/__init__.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/gi/__init__.py b/gi/__init__.py index 1060005d..0645d448 100644 --- a/gi/__init__.py +++ b/gi/__init__.py @@ -27,7 +27,6 @@ __path__ = extend_path(__path__, __name__) from ._gi import _API from ._gi import Repository from ._gi import PyGIDeprecationWarning -from ._gi import threads_init # Force loading the GObject typelib so we have available the wrappers for # base classes such as GInitiallyUnowned @@ -36,7 +35,6 @@ gi # pyflakes _API = _API # pyflakes PyGIDeprecationWarning = PyGIDeprecationWarning -threads_init import os |