Run the reactor event loop, with activity monitoring and timeouts
This is typically used to control the lifetime of an event-driven
application. The application invokes run() with the desired parameters
once the system reactor is ready to run.
Reactor-driven components should invoke the activityOccurred() method
on this interface whenever I/O or useful processing occurs, in order to
prevent inactivity timeouts.
Methods
|
|
activityOccurred
exitWith
run
|
|
activityOccurred
|
activityOccurred ()
Call this periodically to prevent inactivity timeouts.
|
|
exitWith
|
exitWith ( self, exitCode )
Exit the mainloop immediately, returning exitCode
|
|
run
|
run (
stopAfter=0,
idleTimeout=0,
runAtLeast=0,
)
Loop polling for IO, GUI, and scheduled events
-
stopAfter
- No scheduled actions will be invoked after this
many seconds.
run() will exit soon afterward.
(Zero means "run until the reactor stops".)
-
idleTimeout
- If
activityOccurred() is not called for this
many seconds, stop and return from run() .
(Zero means, "don't check for inactivity".)
-
runAtLeast
- run at least this many seconds before an
idleTimeout
is allowed to occur. (Zero means, "idle timeouts
may occur any time after the run starts.")
|
|