kopia lustrzana https://github.com/micropython/micropython-lib
uasyncio: wait: Add workaround against heap alloc on empty iteration.
"for a in ():" unconditionally allocates heap so far, per https://github.com/micropython/micropython/issues/2716 . So, test for empty result before iterating over it.pull/62/merge
rodzic
9d5919dd1c
commit
f29be360c0
|
@ -60,6 +60,9 @@ class EpollEventLoop(EventLoop):
|
|||
else:
|
||||
res = self.poller.poll(delay, 1)
|
||||
#log.debug("epoll result: %s", res)
|
||||
# Remove "if res" workaround after
|
||||
# https://github.com/micropython/micropython/issues/2716 fixed.
|
||||
if res:
|
||||
for fd, ev in res:
|
||||
cb = self.objmap[fd]
|
||||
if __debug__:
|
||||
|
|
Ładowanie…
Reference in New Issue