Merge pull request #3160 from bdarnell/ioloop-docs
ioloop: Update docs for IOLoop constructor
This commit is contained in:
commit
6cfa37ab4e
|
@ -119,10 +119,12 @@ class IOLoop(Configurable):
|
||||||
.. testoutput::
|
.. testoutput::
|
||||||
:hide:
|
:hide:
|
||||||
|
|
||||||
Do not attempt to construct an `IOLoop` directly; this is deprecated since
|
Most applications should not attempt to construct an `IOLoop` directly,
|
||||||
Tornado 6.2. Instead, initialize the `asyncio` event loop and use
|
and instead initialize the `asyncio` event loop and use `IOLoop.current()`.
|
||||||
`IOLoop.current()` to access an `IOLoop` wrapper around the current event
|
In some cases, such as in test frameworks when initializing an `IOLoop`
|
||||||
loop.
|
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 general, an `IOLoop` cannot survive a fork or be shared across processes
|
||||||
in any way. When multiple processes are being used, each process should
|
in any way. When multiple processes are being used, each process should
|
||||||
|
|
Loading…
Reference in New Issue