Commit e3556ddd authored by Denis Bilenko's avatar Denis Bilenko

test__event.py: update to use new spawn_later interface

parent dbab98a1
......@@ -48,7 +48,7 @@ class TestEvent(greentest.TestCase):
event1 = coros.event()
event2 = coros.event()
g = gevent.spawn_later(DELAY/2.0, event1.send, 'hello event1')
g, timer = gevent.spawn_later(DELAY/2.0, event1.send, 'hello event1')
t = gevent.Timeout(0, ValueError('interrupted'))
try:
try:
......@@ -60,6 +60,7 @@ class TestEvent(greentest.TestCase):
finally:
t.cancel()
g.kill(block=True)
timer.cancel()
if __name__=='__main__':
......
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