Home | Trees | Index | Help |
|
---|
Package twisted :: Package internet :: Module main |
|
Backwards compatability, and utility functions.
In general, this module should not be used, other than by reactor authors who need to use the 'installReactor' method.
Maintainer: Itamar Shtull-TrauringFunction Summary | |
---|---|
_getReactor()
| |
addTimeout(m,
t,
f)
| |
callAfterShutdown(function)
| |
Add a function to be called before shutdown begins. | |
Add a function to be called during shutdown. | |
Add a function to be called when the system starts running. | |
installReactor(reactor)
| |
removeCallAfterShutdown(function)
| |
Remove a function registered with callBeforeShutdown. | |
removeCallDuringShutdown(function)
| |
Run input/output and dispatched/delayed code. | |
Run all shutdown callbacks (save all running Applications) and exit. | |
stopMainLoop(*ignored)
|
Variable Summary | |
---|---|
list |
afterShutdown = []
|
list |
beforeShutdown = []
|
ConnectionDone |
CONNECTION_DONE = <twisted.internet.error.ConnectionDone...
|
ConnectionLost |
CONNECTION_LOST = <twisted.internet.error.ConnectionLost...
|
list |
duringShutdown = []
|
int |
interruptCountdown = 5 |
NoneType |
running = None |
NoneType |
shuttingDown = None |
Function Details |
---|
callBeforeShutdown(function)Add a function to be called before shutdown begins. These functions are tasks to be performed in order to run a "clean" shutdown. This may involve tasks that keep the mainloop running, so any function registered in this list may return a Deferred, which will delay the actual shutdown until later. |
callDuringShutdown(function)Add a function to be called during shutdown. These functions ought to shut down the event loop -- stopping thread pools, closing down all connections, etc. |
callWhenRunning(function)Add a function to be called when the system starts running. If the system is already running, then the function runs immediately. If the system has not yet started running, the function will be queued to get run when the mainloop starts. |
removeCallBeforeShutdown(function)Remove a function registered with callBeforeShutdown. |
run(installSignalHandlers=1)Run input/output and dispatched/delayed code. Don't call this directly. This call "never" returns. |
shutDown(*ignored)Run all shutdown callbacks (save all running Applications) and exit. This is called by various signal handlers which should cause the process to exit. It can also be called directly in order to trigger a clean shutdown. |
Variable Details |
---|
afterShutdown
|
beforeShutdown
|
CONNECTION_DONE
|
CONNECTION_LOST
|
duringShutdown
|
interruptCountdown
|
running
|
shuttingDown
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat May 15 20:08:08 2004 | http://epydoc.sf.net |