Part of twisted.internet View Source
The default reactor depends on the platform and will be installed if this module is imported without another reactor being explicitly installed beforehand. Regardless of which reactor is installed, importing this module is the correct way to get a reference to it.
New application code should prefer to pass and accept the reactor as a parameter where it is needed, rather than relying on being able to import this module to get a reference. This simplifies unit testing and may make it easier to one day support multiple reactors (as a performance enhancement), though this is not currently possible.
See Also | IReactorCore | |
IReactorTime | ||
IReactorProcess | ||
IReactorTCP | ||
IReactorSSL | ||
IReactorUDP | ||
IReactorMulticast | ||
IReactorUNIX | ||
IReactorUNIXDatagram | ||
IReactorFDSet | ||
IReactorThreads | ||
IReactorPluggableResolver |