interrupt multitask
#2330
-
|
Whats a good way to interrupt multitask functions? |
Beta Was this translation helpful? Give feedback.
Answered by
dlech
Aug 24, 2025
Replies: 1 comment 3 replies
-
|
From inside the function, you can just You can also do There is also a bit about cancellation in https://github.com/orgs/pybricks/discussions/356. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A
Taskobject or a coroutine. This is the value returned by calling an async function.is basically the same as
Except now you have variables with the task objects. So you can call
t1.close()to cancel that task.