Skip to content
Discussion options

You must be logged in to vote

A Task object or a coroutine. This is the value returned by calling an async function.

t1 = task1()
t2 = task2()
await multitask(t1, t2)

is basically the same as

await multitask(task1(), task2())

Except now you have variables with the task objects. So you can call t1.close() to cancel that task.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ytraub
Comment options

@dlech
Comment options

Answer selected by ytraub
@ytraub
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants