Commit aacd5670 authored by Mark Peek's avatar Mark Peek

Fix linux poller SimultaneousError during timeout

The linux poller was not cleaning up the inserted wait_for event
when a poller timeout occurred. This fixes the SimultaneousError
when using with_timeout() (fixes #57).
parent 9c063889
......@@ -293,7 +293,11 @@ cdef public class queue_poller [ object queue_poller_object, type queue_poller_t
cdef event_key ek
ek = event_key (events, fd)
self.set_wait_for (ek)
return _YIELD()
try:
return _YIELD()
finally:
if ek in self.event_map:
del self.event_map[ek]
def wait_for (self, int fd, int events):
"""Wait for an event.
......
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