kopia lustrzana https://github.com/micropython/micropython-lib
asyncio: Add remove_reader()/remove_writer().
rodzic
9301c152bd
commit
aff251b129
|
@ -111,10 +111,18 @@ class EpollEventLoop(EventLoop):
|
||||||
log.debug("add_reader%s", (fd, cb, args))
|
log.debug("add_reader%s", (fd, cb, args))
|
||||||
self.poller.register(fd, select.EPOLLIN, (cb, args))
|
self.poller.register(fd, select.EPOLLIN, (cb, args))
|
||||||
|
|
||||||
|
def remove_reader(self, fd):
|
||||||
|
log.debug("remove_reader(%s)", fd)
|
||||||
|
self.poller.unregister(fd)
|
||||||
|
|
||||||
def add_writer(self, fd, cb, *args):
|
def add_writer(self, fd, cb, *args):
|
||||||
log.debug("add_writer%s", (fd, cb, args))
|
log.debug("add_writer%s", (fd, cb, args))
|
||||||
self.poller.register(fd, select.EPOLLOUT, (cb, args))
|
self.poller.register(fd, select.EPOLLOUT, (cb, args))
|
||||||
|
|
||||||
|
def remove_writer(self, fd):
|
||||||
|
log.debug("remove_writer(%s)", fd)
|
||||||
|
self.poller.unregister(fd)
|
||||||
|
|
||||||
def wait(self, delay):
|
def wait(self, delay):
|
||||||
log.debug("epoll.wait(%d)", delay)
|
log.debug("epoll.wait(%d)", delay)
|
||||||
if delay == -1:
|
if delay == -1:
|
||||||
|
|
Ładowanie…
Reference in New Issue