twisted.internet.selectreactor.SelectReactor(posixbase.PosixReactorBase, _extraBase)
class documentationtwisted.internet.selectreactor
View Source
(View In Hierarchy)
Known subclasses: twisted.internet._glibbase.PortableGlibReactorBase
Implements interfaces: twisted.internet.interfaces.IReactorFDSet
A select() based reactor - runs on all POSIX platforms and on Win32.
Method | __init__ | Initialize file descriptor tracking dictionaries and the base class. |
Method | doSelect | Run one iteration of the I/O monitor loop. |
Method | addReader | Add a FileDescriptor for notification of data available to read. |
Method | addWriter | Add a FileDescriptor for notification of data available to write. |
Method | removeReader | Remove a Selectable for notification of data available to read. |
Method | removeWriter | Remove a Selectable for notification of data available to write. |
Method | removeAll | Remove all readers and writers. |
Method | getReaders | Return the list of file descriptors currently monitored for input events by the reactor. |
Method | getWriters | Return the list file descriptors currently monitored for output events by the reactor. |
Instance Variable | _reads | A set containing FileDescriptor
instances which will be checked for read events. |
Instance Variable | _writes | A set containing FileDescriptor
instances which will be checked for writability. |
Method | _preenDescriptors | Undocumented |
Method | _doReadOrWrite | Undocumented |
Inherited from _ThreadedWin32EventsMixin:
Method | addEvent | |
Method | removeEvent | |
Instance Variable | _reactor | The Win32Reactor
running in the other thread. This is None until it is
actually needed. |
Instance Variable | _reactorThread | The threading.Thread which is running the Win32Reactor .
This is None until it is actually needed. |
Method | _unmakeHelperReactor | Stop and discard the reactor started by
_makeHelperReactor . |
Method | _makeHelperReactor | Create and (in a new thread) start a Win32Reactor
instance to use for the implementation of IReactorWin32Events . |
Inherited from _ThreadedWin32EventsMixin:
Method | addEvent | |
Method | removeEvent | |
Instance Variable | _reactor | The Win32Reactor
running in the other thread. This is None until it is
actually needed. |
Instance Variable | _reactorThread | The threading.Thread which is running the Win32Reactor .
This is None until it is actually needed. |
Method | _unmakeHelperReactor | Stop and discard the reactor started by
_makeHelperReactor . |
Method | _makeHelperReactor | Create and (in a new thread) start a Win32Reactor
instance to use for the implementation of IReactorWin32Events . |
Inherited from _ThreadedWin32EventsMixin:
Method | addEvent | |
Method | removeEvent | |
Instance Variable | _reactor | The Win32Reactor
running in the other thread. This is None until it is
actually needed. |
Instance Variable | _reactorThread | The threading.Thread which is running the Win32Reactor .
This is None until it is actually needed. |
Method | _unmakeHelperReactor | Stop and discard the reactor started by
_makeHelperReactor . |
Method | _makeHelperReactor | Create and (in a new thread) start a Win32Reactor
instance to use for the implementation of IReactorWin32Events . |
Inherited from _ThreadedWin32EventsMixin:
Method | addEvent | |
Method | removeEvent | |
Instance Variable | _reactor | The Win32Reactor
running in the other thread. This is None until it is
actually needed. |
Instance Variable | _reactorThread | The threading.Thread which is running the Win32Reactor .
This is None until it is actually needed. |
Method | _unmakeHelperReactor | Stop and discard the reactor started by
_makeHelperReactor . |
Method | _makeHelperReactor | Create and (in a new thread) start a Win32Reactor
instance to use for the implementation of IReactorWin32Events . |
Inherited from _ThreadedWin32EventsMixin:
Method | addEvent | |
Method | removeEvent | |
Instance Variable | _reactor | The Win32Reactor
running in the other thread. This is None until it is
actually needed. |
Instance Variable | _reactorThread | The threading.Thread which is running the Win32Reactor .
This is None until it is actually needed. |
Method | _unmakeHelperReactor | Stop and discard the reactor started by
_makeHelperReactor . |
Method | _makeHelperReactor | Create and (in a new thread) start a Win32Reactor
instance to use for the implementation of IReactorWin32Events . |
Initialize file descriptor tracking dictionaries and the base class.
Run one iteration of the I/O monitor loop.
This will run all selectables who had input or output readiness waiting for them.
Add a FileDescriptor for notification of data available to read.
Add a FileDescriptor for notification of data available to write.
Remove a Selectable for notification of data available to read.
Remove a Selectable for notification of data available to write.
Remove all readers and writers.
Should not remove reactor internal reactor connections (like a waker).
Returns | A list of IReadDescriptor
and IWriteDescriptor
providers which were removed. |
Return the list of file descriptors currently monitored for input events by the reactor.
Returns | the list of file descriptors monitored for input events. (type: list of IReadDescriptor ) |
Return the list file descriptors currently monitored for output events by the reactor.
Returns | the list of file descriptors monitored for output events. (type: list of IWriteDescriptor ) |