Skip to content

Commit

Permalink
Merge pull request #3160 from bdarnell/ioloop-docs
Browse files Browse the repository at this point in the history
ioloop: Update docs for IOLoop constructor
  • Loading branch information
bdarnell committed Jun 17, 2022
2 parents 12d4d0a + 32642b7 commit 6cfa37a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tornado/ioloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@ async def main():
.. testoutput::
:hide:
Do not attempt to construct an `IOLoop` directly; this is deprecated since
Tornado 6.2. Instead, initialize the `asyncio` event loop and use
`IOLoop.current()` to access an `IOLoop` wrapper around the current event
loop.
Most applications should not attempt to construct an `IOLoop` directly,
and instead initialize the `asyncio` event loop and use `IOLoop.current()`.
In some cases, such as in test frameworks when initializing an `IOLoop`
to be run in a secondary thread, it may be appropriate to construct
an `IOLoop` with ``IOLoop(make_current=False)``. Constructing an `IOLoop`
without the ``make_current=False`` argument is deprecated since Tornado 6.2.
In general, an `IOLoop` cannot survive a fork or be shared across processes
in any way. When multiple processes are being used, each process should
Expand Down

0 comments on commit 6cfa37a

Please sign in to comment.