From: Ben Darnell Date: Sun, 30 Dec 2018 19:55:14 +0000 (-0500) Subject: concurrent: Update docs X-Git-Tag: v6.0.0b1~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27d15b91f8317e7de3c5bd2977ce940161083960;p=thirdparty%2Ftornado.git concurrent: Update docs --- 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