def poll(self, timeout=0.01):
inn, out, pri = select.select( self._pool_in, self._pool_out, self._pool_pri, timeout )
for fd in inn:
self._callbacks.get(fd, DO_NOTHING)(fd, Poller.POLLIN)
for fd in out:
self._callbacks.get(fd, DO_NOTHING)(fd, Poller.POLLOUT)
for fd in pri:
self._callbacks.get(fd, DO_NOTHING)(fd, Poller.POLLPRI)
评论列表
文章目录