asyncio: EpollEventLoop.wait(): support infinite wait.

asyncio-segfault
Paul Sokolovsky 2014-04-20 06:01:04 +03:00
rodzic e2403bde0a
commit 65f0a05f2a
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -95,7 +95,11 @@ class EpollEventLoop(EventLoop):
self.poller.register(fd, select.EPOLLOUT, (cb, args))
def wait(self, delay):
res = self.poller.poll(int(delay * 1000))
print("epoll.wait", delay)
if delay == -1:
res = self.poller.poll(-1)
else:
res = self.poller.poll(int(delay * 1000))
print("poll: ", res)
for cb, ev in res:
cb[0](*cb[1])