Skip to content

Commit 65f0a05

Browse files
committed
asyncio: EpollEventLoop.wait(): support infinite wait.
1 parent e2403bd commit 65f0a05

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

asyncio/asyncio.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ def add_writer(self, fd, cb, *args):
9595
self.poller.register(fd, select.EPOLLOUT, (cb, args))
9696

9797
def wait(self, delay):
98-
res = self.poller.poll(int(delay * 1000))
98+
print("epoll.wait", delay)
99+
if delay == -1:
100+
res = self.poller.poll(-1)
101+
else:
102+
res = self.poller.poll(int(delay * 1000))
99103
print("poll: ", res)
100104
for cb, ev in res:
101105
cb[0](*cb[1])

0 commit comments

Comments
 (0)