The reactor is the Twisted event loop within Twisted, the loop which drives applications using Twisted. The reactor provides APIs for networking, threading, dispatching events, and more.

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 AlsoIReactorCore
IReactorTime
IReactorProcess
IReactorTCP
IReactorSSL
IReactorUDP
IReactorMulticast
IReactorUNIX
IReactorUNIXDatagram
IReactorFDSet
IReactorThreads
IReactorPluggableResolver
API Documentation for Twisted, generated by pydoctor at 2018-10-15 19:29:43.