Tin mới
Networking and Interprocess Communication
a Task object wrapping obj, if obj is a coroutine (iscoroutine() is used for the test); in this case the coroutine will be scheduled by ensure_future().
a Task object that would await on obj, if obj is an awaitable (inspect.isawaitable() is used for the test.)
Wrap a concurrent.futures.Future object in a asyncio.Future object.
A Future represents an eventual result of an asynchronous operation. Not thread-safe.
contextvars: Context Variables
Changed in version 3.7: Added support for the contextvars module.
If the Future is done and has a result set by the set_result() method, the result value is returned.
The callback is called with the Future object as its only argument.