Commit b34ff1db authored by Denis Bilenko's avatar Denis Bilenko

Greenlet: add 'loop' property. This fixes AttributeError in killall()

parent 3a773e93
...@@ -146,6 +146,10 @@ class Greenlet(greenlet): ...@@ -146,6 +146,10 @@ class Greenlet(greenlet):
self._notifier = loop.callback() self._notifier = loop.callback()
self._start_event = loop.callback() self._start_event = loop.callback()
@property
def loop(self):
return self.parent.loop
def __nonzero__(self): def __nonzero__(self):
return self._start_event.pending or greenlet.__nonzero__(self) return self._start_event.pending or greenlet.__nonzero__(self)
......
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