– Waiting for I/O completion

Waiting for I/O completion.


alias of OSError

class poll[source]

Bases: object

An implementation of select.poll that blocks only the current greenlet.


POLLPRI data is not supported.

New in version 1.1b1.

Changed in version 1.5: This is now always defined, regardless of whether the standard library defines select.poll() or not. Note that it may have different performance characteristics.


poll the registered fds.

Changed in version 1.2a1: File descriptors that are closed are reported with POLLNVAL.

Changed in version 1.3a2: Under libuv, interpret timeout values less than 0 the same as None, i.e., block. This was always the case with libev.


Unregister the fd.

Changed in version 1.2a1: Raise a KeyError if fd was not registered, like the standard library. Previously gevent did nothing.

select(rlist, wlist, xlist, timeout=None)[source]

An implementation of that blocks only the current greenlet.


xlist is ignored.

Changed in version 1.2a1: Raise a ValueError if timeout is negative. This matches Python 3’s behaviour (Python 2 would raise a select.error). Previously gevent had undefined behaviour.

Changed in version 1.2a1: Raise an exception if any of the file descriptors are invalid.

Next page: gevent.selectors – High-level IO Multiplexing