circuits.core.pollers module¶
Poller Components for asynchronous file and socket I/O.
This module contains Poller components that enable polling of file or socket descriptors for read/write events. Pollers: - Select - Poll - EPoll
- class circuits.core.pollers.BasePoller(*args, **kwargs)¶
Bases:
BaseComponent
initializes x; see x.__class__.__doc__ for signature
- channel = None¶
- resume()¶
- addReader(source, fd)¶
- addWriter(source, fd)¶
- removeReader(fd)¶
- removeWriter(fd)¶
- isReading(fd)¶
- isWriting(fd)¶
- discard(fd)¶
- getTarget(fd)¶
- class circuits.core.pollers.Select(...)¶
Bases:
BasePoller
Creates a new Select Poller Component that uses the select poller implementation. This poller is not recommended but is available for legacy reasons as most systems implement select-based polling for backwards compatibility.
initializes x; see x.__class__.__doc__ for signature
- channel = 'select'¶
- class circuits.core.pollers.Poll(...)¶
Bases:
BasePoller
Creates a new Poll Poller Component that uses the poll poller implementation.
initializes x; see x.__class__.__doc__ for signature
- channel = 'poll'¶
- addReader(source, fd)¶
- addWriter(source, fd)¶
- removeReader(fd)¶
- removeWriter(fd)¶
- discard(fd)¶
- class circuits.core.pollers.EPoll(...)¶
Bases:
BasePoller
Creates a new EPoll Poller Component that uses the epoll poller implementation.
initializes x; see x.__class__.__doc__ for signature
- channel = 'epoll'¶
- addReader(source, fd)¶
- addWriter(source, fd)¶
- removeReader(fd)¶
- removeWriter(fd)¶
- discard(fd)¶
- class circuits.core.pollers.KQueue(...)¶
Bases:
BasePoller
Creates a new KQueue Poller Component that uses the kqueue poller implementation.
initializes x; see x.__class__.__doc__ for signature
- channel = 'kqueue'¶
- addReader(source, sock)¶
- addWriter(source, sock)¶
- removeReader(sock)¶
- removeWriter(sock)¶
- discard(sock)¶