Skip to content

Commit

Permalink
concurrent: Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarnell committed Dec 30, 2018
1 parent 6cc02fb commit 27d15b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
4 changes: 1 addition & 3 deletions docs/concurrent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

.. class:: Future

``tornado.concurrent.Future`` is an alias for `asyncio.Future`
on Python 3. On Python 2, it provides an equivalent
implementation.
``tornado.concurrent.Future`` is an alias for `asyncio.Future`.

In Tornado, the main way in which applications interact with
``Future`` objects is by ``awaiting`` or ``yielding`` them in
Expand Down
16 changes: 7 additions & 9 deletions tornado/concurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
# under the License.
"""Utilities for working with ``Future`` objects.
``Futures`` are a pattern for concurrent programming introduced in
Python 3.2 in the `concurrent.futures` package, and also adopted (in a
slightly different form) in Python 3.4's `asyncio` package. This
package defines a ``Future`` class that is an alias for `asyncio.Future`
when available, and a compatible implementation for older versions of
Python. It also includes some utility functions for interacting with
``Future`` objects.
While this package is an important part of Tornado's internal
Tornado previously provided its own ``Future`` class, but now uses
`asyncio.Future`. This module contains utility functions for working
with `asyncio.Future` in a way that is backwards-compatible with
Tornado's old ``Future`` implementation.
While this module is an important part of Tornado's internal
implementation, applications rarely need to interact with it
directly.
"""

import asyncio
Expand Down

0 comments on commit 27d15b9

Please sign in to comment.