Document interactions with TornadoReactor and multi-process.

See #1501.
This commit is contained in:
Ben Darnell 2015-09-27 18:09:16 -04:00
parent 8a911d639f
commit 9ebfc39754
1 changed files with 9 additions and 0 deletions

View File

@ -339,8 +339,17 @@ class _TestReactor(TornadoReactor):
def install(io_loop=None):
"""Install this package as the default Twisted reactor.
``install()`` must be called very early in the startup process,
before most other twisted-related imports. Conversely, because it
initializes the `.IOLoop`, it cannot be called before
`.fork_processes` or multi-process `~.TCPServer.start`. These
conflicting requirements make it difficult to use `.TornadoReactor`
in multi-process mode, and an external process manager such as
``supervisord`` is recommended instead.
.. versionchanged:: 4.1
The ``io_loop`` argument is deprecated.
"""
if not io_loop:
io_loop = tornado.ioloop.IOLoop.current()