Class a.p.PollReactor(threading.Thread):

Part of aculab.posixreactor View Source View In Hierarchy

Prosody Event reactor for Unix systems with poll(), most notably Linux.

Experimental support for notifications.
Method __init__ Create a reactor.
Method add_timer Add a timer after interval in seconds.
Method cancel_timer Cancel a timer.
Method add Add an event to the reactor.
Method remove Remove a handle from the reactor.
Method update Update our list of fds.
Method run_timers Run the pending timers.
Method run Run the reactor.
def __init__(self): (source)
Create a reactor.
def add_timer(self, interval, function, args=, kwargs={}): (source)
Add a timer after interval in seconds.
def cancel_timer(self, timer): (source)
Cancel a timer. Cancelling an expired timer raises a ValueError
def add(self, handle, mode, method): (source)
Add an event to the reactor.
ParametershandleA file descriptor, not a File object.
modeA bitmask of select.POLLOUT, select.POLLIN, etc.
methodThis will be called when the event is fired.
def remove(self, handle): (source)
Remove a handle from the reactor.
Parametershandle

A file descriptor.

This method blocks until handle is removed by the reactor thread.
def update(self): (source)
Update our list of fds.
def run_timers(self): (source)
Run the pending timers.
Returnstime to wait for the next timer.
def run(self): (source)
Run the reactor.
API Documentation for pyAculab, generated by pydoctor at 2009-01-02 15:12:29.