Part of twisted.internet.epollreactor View Source View In Hierarchy
Implements interfaces: twisted.internet.interfaces.IReactorFDSet
| Instance Variables | _poller | A poll which will be used to check for I/O readiness.
|
| _selectables | A dictionary mapping integer file descriptors to instances of FileDescriptor
which have been registered with the reactor. All
FileDescriptors which are currently receiving read or write
readiness notifications will be present as values in this dictionary.
| |
| _reads | A dictionary mapping integer file descriptors to arbitrary values
(this is essentially a set). Keys in this dictionary will be registered
with _poller for read readiness notifications which will be
dispatched to the corresponding FileDescriptor
instances in _selectables.
| |
| _writes | A dictionary mapping integer file descriptors to arbitrary values
(this is essentially a set). Keys in this dictionary will be registered
with _poller for write readiness notifications which will be
dispatched to the corresponding FileDescriptor
instances in _selectables.
|
Split Table into Classes Show Methods in One Table
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 57 | Method | __init__ | Initialize epoll object, file descriptor tracking dictionaries, and the |
| 95 | Method | addReader | Add a FileDescriptor for notification of data available to read. |
| 102 | Method | addWriter | Add a FileDescriptor for notification of data available to write. |
| 136 | Method | removeReader | Remove a Selectable for notification of data available to read. |
| 143 | Method | removeWriter | Remove a Selectable for notification of data available to write. |
| 149 | Method | removeAll | Remove all selectables, and return a list of them. |
| 177 | Method | getReaders | Return the list of file descriptors currently monitored for input |
| 181 | Method | getWriters | Return the list file descriptors currently monitored for output events |
| 185 | Method | doPoll | Poll the poller for new events. |
| 71 | Method | _add | Private method for adding a descriptor from the event loop. |
| 109 | Method | _remove | Private method for removing a descriptor from the event loop. |
| 219 | Method | _doReadOrWrite | fd is available for read or write, make the work and raise errors |
Inherited from PosixReactorBase:
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 198 | Method | installWaker | Install a `waker' to allow threads and signals to wake up the IO thread. |
| 212 | Method | spawnProcess | Spawn a process, with a process protocol. |
| 243 | Method | listenUDP | Connects a given DatagramProtocol
to the given numeric UDP port.
|
| 252 | Method | connectUDP | DEPRECATED. |
| 266 | Method | listenMulticast | Connects a given DatagramProtocol to the given numeric UDP port. |
| 280 | Method | connectUNIX | |
| 307 | Method | listenUNIX | |
| 321 | Method | listenUNIXDatagram | Connects a given DatagramProtocol
to the given path.
|
| 336 | Method | connectUNIXDatagram | Connects a ConnectedDatagramProtocol
instance to a path.
|
| 352 | Method | listenTCP | |
| 359 | Method | connectTCP | |
| 368 | Method | connectSSL | |
| 376 | Method | listenSSL | |
| 385 | Method | listenWith | Start an instance of the given portType listening.
|
| 391 | Method | connectWith | Start an instance of the given connectorType
connecting.
|
| 175 | Method | _disconnectSelectable | Utility function for disconnecting a selectable. |
| 289 | Method | _checkMode | Check mode to see if a value was specified for it and
emit a
|
| 397 | Method | _removeAll | Remove all readers and writers, and return list of Selectables. |
Inherited from _SignalReactorMixin (via PosixReactorBase):
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 1096 | Method | startRunning | Extend the base implementation in order to remember whether signal |
| 1126 | Method | run | Undocumented |
| 1131 | Method | mainLoop | Undocumented |
| 1055 | Method | _handleSignals | Install the signal handlers for the Twisted event loop. |
| 1079 | Method | _handleSigchld | Reap all processes on SIGCHLD. |
| 1110 | Method | _reallyStartRunning | Extend the base implementation by also installing signal handlers, if |
Inherited from ReactorBase (via PosixReactorBase):
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 456 | Method | installResolver | Set the internal resolver to use to for name lookups. |
| 462 | Method | wakeUp | Wake up the event loop. |
| 470 | Method | doIteration | Do one iteration over the readers and writers which have been added. |
| 508 | Method | resolve | Return a Deferred that will resolve a hostname. |
| 521 | Method | stop | See twisted.internet.interfaces.IReactorCore.stop. |
| 532 | Method | crash | See twisted.internet.interfaces.IReactorCore.crash. |
| 545 | Method | sigInt | Handle a SIGINT interrupt. |
| 551 | Method | sigBreak | Handle a SIGBREAK interrupt. |
| 557 | Method | sigTerm | Handle a SIGTERM interrupt. |
| 563 | Method | disconnectAll | Disconnect every reader, and writer in the system. |
| 573 | Method | iterate | See twisted.internet.interfaces.IReactorCore.iterate. |
| 580 | Method | fireSystemEvent | See twisted.internet.interfaces.IReactorCore.fireSystemEvent. |
| 588 | Method | addSystemEventTrigger | See twisted.internet.interfaces.IReactorCore.addSystemEventTrigger. |
| 598 | Method | removeSystemEventTrigger | See twisted.internet.interfaces.IReactorCore.removeSystemEventTrigger. |
| 605 | Method | callWhenRunning | See twisted.internet.interfaces.IReactorCore.callWhenRunning. |
| 614 | Method | startRunning | Method called when reactor starts: do some initialization and fire |
| 648 | Method | callLater | See twisted.internet.interfaces.IReactorTime.callLater. |
| 684 | Method | cancelCallLater | See twisted.internet.interfaces.IReactorTime.cancelCallLater. |
| 692 | Method | getDelayedCalls | Return all the outstanding delayed calls in the system. |
| 708 | Method | timeout | Undocumented |
| 718 | Method | runUntilCurrent | Run all pending timed calls. |
| 871 | Method | callFromThread 0 | See twisted.internet.interfaces.IReactorThreads.callFromThread.
|
| 900 | Method | callInThread | See twisted.internet.interfaces.IReactorThreads.callInThread.
|
| 908 | Method | suggestThreadPoolSize | See twisted.internet.interfaces.IReactorThreads.suggestThreadPoolSize.
|
| 919 | Method | callFromThread | Cause a function to be executed by the reactor thread. |
| 637 | Method | _reallyStartRunning | Method called to transition to the running state. This should happen |
| 661 | Method | _moveCallLaterSooner | Undocumented |
| 681 | Method | _cancelCallLater | Undocumented |
| 699 | Method | _insertNewDelayedCalls | Undocumented |
| 783 | Method | _checkProcessArgs | Check for valid arguments and environment to spawnProcess. |
| 866 | Method | _initThreads | Undocumented |
| 882 | Method | _initThreadPool | Create the threadpool accessible with callFromThread. |
| 892 | Method | _stopThreadPool | Stop the reactor threadpool. |
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 57 | Method | __init__ | Initialize epoll object, file descriptor tracking dictionaries, and the |
| 95 | Method | addReader | Add a FileDescriptor for notification of data available to read. |
| 588 | Method | addSystemEventTrigger | See twisted.internet.interfaces.IReactorCore.addSystemEventTrigger. |
| 102 | Method | addWriter | Add a FileDescriptor for notification of data available to write. |
| 919 | Method | callFromThread | Cause a function to be executed by the reactor thread. |
| 871 | Method | callFromThread 0 | See twisted.internet.interfaces.IReactorThreads.callFromThread.
|
| 900 | Method | callInThread | See twisted.internet.interfaces.IReactorThreads.callInThread.
|
| 648 | Method | callLater | See twisted.internet.interfaces.IReactorTime.callLater. |
| 605 | Method | callWhenRunning | See twisted.internet.interfaces.IReactorCore.callWhenRunning. |
| 684 | Method | cancelCallLater | See twisted.internet.interfaces.IReactorTime.cancelCallLater. |
| 368 | Method | connectSSL | |
| 359 | Method | connectTCP | |
| 252 | Method | connectUDP | DEPRECATED. |
| 280 | Method | connectUNIX | |
| 336 | Method | connectUNIXDatagram | Connects a ConnectedDatagramProtocol
instance to a path.
|
| 391 | Method | connectWith | Start an instance of the given connectorType
connecting.
|
| 532 | Method | crash | See twisted.internet.interfaces.IReactorCore.crash. |
| 563 | Method | disconnectAll | Disconnect every reader, and writer in the system. |
| 470 | Method | doIteration | Do one iteration over the readers and writers which have been added. |
| 185 | Method | doPoll | Poll the poller for new events. |
| 580 | Method | fireSystemEvent | See twisted.internet.interfaces.IReactorCore.fireSystemEvent. |
| 692 | Method | getDelayedCalls | Return all the outstanding delayed calls in the system. |
| 177 | Method | getReaders | Return the list of file descriptors currently monitored for input |
| 181 | Method | getWriters | Return the list file descriptors currently monitored for output events |
| 456 | Method | installResolver | Set the internal resolver to use to for name lookups. |
| 198 | Method | installWaker | Install a `waker' to allow threads and signals to wake up the IO thread. |
| 573 | Method | iterate | See twisted.internet.interfaces.IReactorCore.iterate. |
| 266 | Method | listenMulticast | Connects a given DatagramProtocol to the given numeric UDP port. |
| 376 | Method | listenSSL | |
| 352 | Method | listenTCP | |
| 243 | Method | listenUDP | Connects a given DatagramProtocol
to the given numeric UDP port.
|
| 307 | Method | listenUNIX | |
| 321 | Method | listenUNIXDatagram | Connects a given DatagramProtocol
to the given path.
|
| 385 | Method | listenWith | Start an instance of the given portType listening.
|
| 1131 | Method | mainLoop | Undocumented |
| 149 | Method | removeAll | Remove all selectables, and return a list of them. |
| 136 | Method | removeReader | Remove a Selectable for notification of data available to read. |
| 598 | Method | removeSystemEventTrigger | See twisted.internet.interfaces.IReactorCore.removeSystemEventTrigger. |
| 143 | Method | removeWriter | Remove a Selectable for notification of data available to write. |
| 508 | Method | resolve | Return a Deferred that will resolve a hostname. |
| 1126 | Method | run | Undocumented |
| 718 | Method | runUntilCurrent | Run all pending timed calls. |
| 551 | Method | sigBreak | Handle a SIGBREAK interrupt. |
| 545 | Method | sigInt | Handle a SIGINT interrupt. |
| 557 | Method | sigTerm | Handle a SIGTERM interrupt. |
| 212 | Method | spawnProcess | Spawn a process, with a process protocol. |
| 1096 | Method | startRunning | Extend the base implementation in order to remember whether signal |
| 614 | Method | startRunning | Method called when reactor starts: do some initialization and fire |
| 521 | Method | stop | See twisted.internet.interfaces.IReactorCore.stop. |
| 908 | Method | suggestThreadPoolSize | See twisted.internet.interfaces.IReactorThreads.suggestThreadPoolSize.
|
| 708 | Method | timeout | Undocumented |
| 462 | Method | wakeUp | Wake up the event loop. |
| 71 | Method | _add | Private method for adding a descriptor from the event loop. |
| 681 | Method | _cancelCallLater | Undocumented |
| 289 | Method | _checkMode | Check mode to see if a value was specified for it and
emit a
|
| 783 | Method | _checkProcessArgs | Check for valid arguments and environment to spawnProcess. |
| 175 | Method | _disconnectSelectable | Utility function for disconnecting a selectable. |
| 219 | Method | _doReadOrWrite | fd is available for read or write, make the work and raise errors |
| 1079 | Method | _handleSigchld | Reap all processes on SIGCHLD. |
| 1055 | Method | _handleSignals | Install the signal handlers for the Twisted event loop. |
| 882 | Method | _initThreadPool | Create the threadpool accessible with callFromThread. |
| 866 | Method | _initThreads | Undocumented |
| 699 | Method | _insertNewDelayedCalls | Undocumented |
| 661 | Method | _moveCallLaterSooner | Undocumented |
| 1110 | Method | _reallyStartRunning | Extend the base implementation by also installing signal handlers, if |
| 637 | Method | _reallyStartRunning | Method called to transition to the running state. This should happen |
| 109 | Method | _remove | Private method for removing a descriptor from the event loop. |
| 397 | Method | _removeAll | Remove all readers and writers, and return list of Selectables. |
| 892 | Method | _stopThreadPool | Stop the reactor threadpool. |
Private method for adding a descriptor from the event loop.
It takes care of adding it if new or modifying it if already added for another state (read -> read/write for example).Private method for removing a descriptor from the event loop.
It does the inverse job of _add, and also add a check in case of the fd has gone away.| Returns | the list of file descriptors monitored for input events.
(type: list of IReadDescriptor
) | |
| Returns | the list of file descriptors monitored for output events.
(type: list of IWriteDescriptor
) | |