Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r61334:6bf80dae95f7
Date: 2013-02-16 16:19 -0500
http://bitbucket.org/pypy/pypy/changeset/6bf80dae95f7/

Log:    fix thread+fork+signals after _signalsenabled dict removal

diff --git a/pypy/module/thread/threadlocals.py 
b/pypy/module/thread/threadlocals.py
--- a/pypy/module/thread/threadlocals.py
+++ b/pypy/module/thread/threadlocals.py
@@ -37,7 +37,7 @@
     def setvalue(self, value):
         ident = rthread.get_ident()
         if value is not None:
-            if len(self._valuedict) == 0:
+            if self._mainthreadident == 0:
                 value._signals_enabled = 1    # the main thread is enabled
                 self._mainthreadident = ident
             self._valuedict[ident] = value
@@ -84,5 +84,5 @@
         if ident != self._mainthreadident:
             ec._signals_enabled += 1
         self._cleanup_()
+        self._mainthreadident = ident
         self.setvalue(ec)
-        self._mainthreadident = ident
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to