Package coro :: Module _coro :: Class queue_poller
[hide private]
[frames] | no frames]

Class queue_poller

object --+
         |
        queue_poller

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
 
poll(...)
 
set_handler(...)
Add a kevent handler.
 
wait_for(...)
Wait for an event.
 
wait_for_read(...)
 
wait_for_write(...)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

set_handler(...)

 

Add a kevent handler.

This is a low-level interface to register a kevent handler.

Parameters:
  • event - : A tuple of (ident, filter) of the kevent to handle.
  • handler - : The handler to use, a callable object which will be called with one argument, a py_kevent object.
  • flags - : Kevent flags to use. Defaults to EV_ADD|EV_ONESHOT.
  • fflags` - : Kevent filter flags to use. Defaults to 0.
Raises:

wait_for(...)

 
Wait for an event.
Parameters:
  • ident - : The kevent identifier (depends on the filter type, but is often a file descriptor).
  • filter - : The kevent filter (see EVFILT).
  • fflags - : Filter flags (defaults to 0).
Returns:
Returns a py_kevent instance that indicates the event that fired.
Raises: