class _ContinuousPolling(_PollLikeMixin, _DisconnectSelectableMixin): (source)
Constructor: _ContinuousPolling(reactor)
Implements interfaces: twisted.internet.interfaces.IReactorFDSet
Schedule reads and writes based on the passage of time, rather than notification.
This is useful for supporting polling filesystem files, which epoll(7) does not support.
The implementation uses _PollLikeMixin
, which is a bit hacky, but re-implementing and testing the relevant code yet again is unappealing.
Method | __init__ |
Undocumented |
Method | add |
Add a FileDescriptor for notification of data available to read. |
Method | add |
Add a FileDescriptor for notification of data available to write. |
Method | get |
Return a list of the readers. |
Method | get |
Return a list of the writers. |
Method | is |
Checks if the file descriptor is currently being observed for read readiness. |
Method | is |
Checks if the file descriptor is currently being observed for write readiness. |
Method | iterate |
Call doRead and doWrite on all readers and writers respectively. |
Method | remove |
Remove all readers and writers. |
Method | remove |
Remove a FileDescriptor from notification of data available to read. |
Method | remove |
Remove a FileDescriptor from notification of data available to write. |
Method | _check |
Start or stop a LoopingCall based on whether there are readers and writers. |
Constant | _POLL |
Undocumented |
Constant | _POLL |
Undocumented |
Constant | _POLL |
Undocumented |
Instance Variable | _loop |
A LoopingCall that drives the polling, or None . |
Instance Variable | _reactor |
The EPollReactor that is using this instance. |
Instance Variable | _readers |
A set of FileDescriptor objects that should be read from. |
Instance Variable | _writers |
A set of FileDescriptor objects that should be written to. |
Inherited from _PollLikeMixin
:
Method | _do |
fd is available for read or write, do the work and raise errors if necessary. |
Inherited from _DisconnectSelectableMixin
(via _PollLikeMixin
):
Method | _disconnect |
Utility function for disconnecting a selectable. |
Checks if the file descriptor is currently being observed for read readiness.
Parameters | |
fd:twisted.internet.abstract.FileDescriptor | The file descriptor being checked. |
Returns | |
bool | True if the file descriptor is being observed for read readiness, False otherwise. |
Checks if the file descriptor is currently being observed for write readiness.
Parameters | |
fd:twisted.internet.abstract.FileDescriptor | The file descriptor being checked. |
Returns | |
bool | True if the file descriptor is being observed for write readiness, False otherwise. |