From 16afc06b8c8e52feaf15f3081900a582dabd5fd8 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 6 Jun 2017 21:04:37 +0300 Subject: [PATCH] uasyncio: Switch to memory-efficient poll.ipoll() method. As added in MicroPython 1.9. --- uasyncio/uasyncio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uasyncio/uasyncio/__init__.py b/uasyncio/uasyncio/__init__.py index 72ec1722..d16fc509 100644 --- a/uasyncio/uasyncio/__init__.py +++ b/uasyncio/uasyncio/__init__.py @@ -55,7 +55,7 @@ class PollEventLoop(EventLoop): if DEBUG and __debug__: log.debug("poll.wait(%d)", delay) # We need one-shot behavior (second arg of 1 to .poll()) - res = self.poller.poll(delay, 1) + res = self.poller.ipoll(delay, 1) #log.debug("poll result: %s", res) # Remove "if res" workaround after # https://github.com/micropython/micropython/issues/2716 fixed.