Commit a3848439 authored by Denis Bilenko's avatar Denis Bilenko

greenlet.Waiter: add 'waiting' attribute

parent 844a866a
......@@ -77,6 +77,10 @@ class Waiter(object):
def __init__(self):
self.greenlet = None
@property
def waiting(self):
return self.greenlet is not None
def switch(self, value=None):
"""Wake up the greenlet that is calling wait() currently (if there is one).
Can only be called from get_hub().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