Commit ab38f367 authored by Denis Bilenko's avatar Denis Bilenko

event.Event: add set/is_set methods to look like Event from threading

parent 5e22a6da
......@@ -107,6 +107,10 @@ class Event(object):
self.unlink(switch)
assert result is self, 'Invalid switch into Event.wait(): %r' % (result, )
# compatibility to threading.Event:
is_set = isSet = ready
set = put
class AsyncResult(Event):
"""Like Greenlet, has 'value' and 'exception' properties, successful() method and get() can raise.
......@@ -175,3 +179,4 @@ def waitall(events):
_NONE = object()
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