fix an indefinite hang which would wait for events although no events

are pending - this happened if items arrive very quickly while
the "reschedule-event" tried unconditionally avoiding a busy-loop
and not schedule new work.
This commit is contained in:
holger krekel
2010-01-19 14:59:22 +01:00
parent bfefd6400b
commit 4a57dfb648
5 changed files with 26 additions and 7 deletions

View File

@@ -1,3 +1,3 @@
#
__version__ = "1.0"
__version__ = "1.1"

View File

@@ -55,7 +55,9 @@ class LoopState(object):
def pytest_rescheduleitems(self, items):
self.colitems[:] = items + self.colitems
self.dowork = False # avoid busywait
for pending in self.dsession.node2pending.values():
if pending:
self.dowork = False # avoid busywait, nodes still have work
class ExitFirstInterrupt(KeyboardInterrupt):
pass