Commit 4cc1ac96 authored by Denis Bilenko's avatar Denis Bilenko

fix bug in Event.wait: it could leave unscheduled switch()

parent 80b4342b
......@@ -106,9 +106,12 @@ class Event(object):
finally:
t.cancel()
except Timeout, exc:
self.unlink(switch)
if exc is not t:
raise
except:
self.unlink(switch)
raise
def put(self, value=None):
import warnings
......
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