Author: Armin Rigo <ar...@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()
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to