Cancel the asynchronous task (if not done) and wait for it to complete.
asyncio.Task
asyncio.Future
Asynchronous task.
cancel_task_and_wait()