Dealing with asyncio and futures

Another key component of the asyncio module is the asyncio.Future class. It is very similar to concurrent.Futures, but, of course, it is adapted to the main mechanism of asyncio: the event loop.

The asyncio.Future class represents a result (but can also be an exception) that is not yet available.

Hence, it represents an abstraction of something that is yet to be achieved. The callbacks that have to process any results are, in fact, added to instances of this class.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.216.36