Книга: Learning Concurrency in Python
Назад: The wait() function
Дальше: Example

Futures

, Executors and Pools. The asyncio module, however, provides a slightly different implementation with which we can play in our Python programs.

The asyncio.futures.Future object implementation of futures is almost identical to the concurrent.futures.Future object in terms of the underlying concepts. They are created with the intention that they will eventually be given a result some time in the future. They also feature all of the same methods that your standard future objects have.

There are, however, three distinct changes that have been outlined in the official documentation, which can be found at . These changes are worth noting to avoid frustration in the future:

Назад: The wait() function
Дальше: Example