Skip to content

Commit 65f0a05

Browse files
author
Paul Sokolovsky
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy