Content-Length: 260729 | pFad | http://github.com/micropython/micropython-lib/commit/65f0a05f2ac68a5f7466910f09d0abb7a7f4019a

D5 asyncio: EpollEventLoop.wait(): support infinite wait. · micropython/micropython-lib@65f0a05 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/micropython/micropython-lib/commit/65f0a05f2ac68a5f7466910f09d0abb7a7f4019a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy