Commit f89bb10d authored by Denis Bilenko's avatar Denis Bilenko

add 'dead' property to Hub

parent 4cdc4934
......@@ -446,6 +446,10 @@ class Hub(object):
self.greenlet = Greenlet(self.run)
self.keyboard_interrupt_signal = None
@property
def dead(self):
return self.greenlet.dead
def switch(self):
cur = getcurrent()
assert cur is not self.greenlet, 'Cannot switch to MAINLOOP from MAINLOOP'
......
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