Commit ef4aaa54 authored by Denis Bilenko's avatar Denis Bilenko

Pool.kill(): make block=True the default

parent fb3a877a
...@@ -89,7 +89,7 @@ class GreenletSet(object): ...@@ -89,7 +89,7 @@ class GreenletSet(object):
finally: finally:
timeout.cancel() timeout.cancel()
def kill(self, exception=GreenletExit, block=False, timeout=None): def kill(self, exception=GreenletExit, block=True, timeout=None):
timer = Timeout.start_new(timeout) timer = Timeout.start_new(timeout)
try: try:
while self.greenlets: while self.greenlets:
...@@ -103,7 +103,7 @@ class GreenletSet(object): ...@@ -103,7 +103,7 @@ class GreenletSet(object):
finally: finally:
timer.cancel() timer.cancel()
def killone(self, greenlet, exception=GreenletExit, block=False, timeout=None): def killone(self, greenlet, exception=GreenletExit, block=True, timeout=None):
if greenlet not in self.dying and greenlet in self.greenlets: if greenlet not in self.dying and greenlet in self.greenlets:
greenlet.kill(exception) greenlet.kill(exception)
self.dying.add(greenlet) self.dying.add(greenlet)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment