Future & Tasks
This lesson discusses futures and tasks that can get scheduled on the event loop.
We'll cover the following...
Futures & Tasks
Future
Future
represents a computation that is either in progress or will get scheduled in the future. It is a special low-level awaitable object that represents an eventual result of an asynchronous operation. Don't confuse threading.Future
and asyncio.Future
. The former is part of the threading
module and doesn't have an __iter__()
method defined on it. asyncio.Future
is an awaitable and can be used with the yield from
statement. In general you shouldn't need to ...