Home | Trees | Indices | Help |
---|
|
object --+ | BasePoller
A poller is an underlying event monitoring system. This generic class can be built upon to implement efficient file descriptor polling methods which are available on various platforms.
A minimal subclass must implement the poll() function which performs a single iteration of the event loop across all monitored Transports and calls process_readables and process_writables with the correct values.
Subclasses should, in most cases call, into BasePoller methods in order to maintain proper accounting structures. The exception is when the poller handles accounting itself.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
initialize the poller and register any kernel global structures necessary to monitor the file descriptors
|
begin monitoring the transport socket for read/connect events the underlying poller should not monitor Transports for writability except when: * the Transport's connection has not yet been established * the Transport has been passed as an argument to defer_write |
defers a write on the given transport. once the async poller determines that the transport can be written to, handle_write will be called |
Must be implemented by subclasses to execute a single iteration of the event loop. Based on the outcome of the events, the following actions MUST be performed * process_readables is called with a list of file descriptors which have data available for reading * process_writables is called with a list of file descriptors which have data available for writing |
for each Transport t corresponding to an fd in the writables sequence, if t is not marked as connected, call handle_connect_event otherwise call handle_write and remove the Transport from the set of deferred writers process close and error events if exception is encountered |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Jun 29 08:51:24 2017 | http://epydoc.sourceforge.net |