From 27d15b91f8317e7de3c5bd2977ce940161083960 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 30 Dec 2018 14:55:14 -0500 Subject: [PATCH] concurrent: Update docs --- docs/concurrent.rst | 4 +--- tornado/concurrent.py | 16 +++++++--------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/docs/concurrent.rst b/docs/concurrent.rst index 5904a60b8..f7a855a38 100644 --- a/docs/concurrent.rst +++ b/docs/concurrent.rst @@ -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 diff --git a/tornado/concurrent.py b/tornado/concurrent.py index df12da87f..b7bb15c01 100644 --- a/tornado/concurrent.py +++ b/tornado/concurrent.py @@ -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 -- 2.47.2