[pypy-commit] pypy release-2.5.x: Use RLock instead of Lock. The goal is to ensure that only one thread
arigo
noreply at buildbot.pypy.org
Mon Mar 16 18:32:16 CET 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: release-2.5.x
Changeset: r76417:418c58fc67fb
Date: 2015-03-16 17:11 +0100
http://bitbucket.org/pypy/pypy/changeset/418c58fc67fb/
Log: Use RLock instead of Lock. The goal is to ensure that only one
thread at a time uses tkinter, if the C library is "non-threaded".
But we're getting rare cases of deadlocks even with only one thread,
which is likely a rare path ending up in a recursive locking.
diff --git a/lib_pypy/_tkinter/app.py b/lib_pypy/_tkinter/app.py
--- a/lib_pypy/_tkinter/app.py
+++ b/lib_pypy/_tkinter/app.py
@@ -96,7 +96,7 @@
if not self.threaded:
# TCL is not thread-safe, calls needs to be serialized.
- self._tcl_lock = threading.Lock()
+ self._tcl_lock = threading.RLock()
else:
self._tcl_lock = _DummyLock()
More information about the pypy-commit
mailing list