Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r91650:29f3c769e610
Date: 2017-06-26 19:33 +0200
http://bitbucket.org/pypy/pypy/changeset/29f3c769e610/

Log:    oops, fix for dc929547a198

diff --git a/lib_pypy/stackless.py b/lib_pypy/stackless.py
--- a/lib_pypy/stackless.py
+++ b/lib_pypy/stackless.py
@@ -276,7 +276,7 @@
                 cando = self.balance > 0
                 dir = 0
 
-            if cando and not self.queue[0].alive:
+            if cando and self.queue[0]._tasklet_killed:
                 # issue #2595: the tasklet was killed while waiting.
                 # drop that tasklet from consideration and try again.
                 self.balance += d
@@ -358,6 +358,8 @@
     module.
     """
     tempval = None
+    _tasklet_killed = False
+
     def __new__(cls, func=None, label=''):
         res = coroutine.__new__(cls)
         res.label = label
@@ -405,6 +407,7 @@
         If the exception passes the toplevel frame of the tasklet,
         the tasklet will silently die.
         """
+        self._tasklet_killed = True
         if not self.is_zombie:
             # Killing the tasklet by throwing TaskletExit exception.
             coroutine.kill(self)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to