A reactor for integrating with CFRunLoop, the CoreFoundation main loop used by macOS.

This is useful for integrating Twisted with PyObjC applications.

Variable __all__ Undocumented
Class CFReactor The CoreFoundation reactor.
Function install Configure the twisted mainloop to be run inside CFRunLoop.
Variable _READ Undocumented
Variable _WRITE Undocumented
Variable _preserveSOError Undocumented
Class _WakerPlus The normal Twisted waker will simply wake up the main loop, which causes an iteration to run, which in turn causes ReactorBase.runUntilCurrent to get invoked.
__all__ =
Undocumented
(type: List[str])
_READ =
Undocumented
(type: int)
_WRITE =
Undocumented
(type: int)
_preserveSOError =
Undocumented
def install(runLoop=None, runner=None): (source)

Configure the twisted mainloop to be run inside CFRunLoop.

ParametersrunLoopthe run loop to use.
runnerthe function to call in order to actually invoke the main loop. This will default to CFRunLoopRun if not specified. However, this is not an appropriate choice for GUI applications, as you need to run NSApplicationMain (or something like it). For example, to run the Twisted mainloop in a PyObjC application, your main.py should look something like this:
    from PyObjCTools import AppHelper
    from twisted.internet.cfreactor import install
    install(runner=AppHelper.runEventLoop)
    # initialize your application
    reactor.run()
ReturnsThe installed reactor. (type: CFReactor)
API Documentation for Twisted, generated by pydoctor at 2020-03-20 23:54:06.