Worker on cancelled don't stop running #4891
Unanswered
DustGalaxy
asked this question in
Q&A
Replies: 2 comments
-
We found the following entries in the FAQ which you may find helpful: Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review. This is an automated reply, generated by FAQtory |
Beta Was this translation helpful? Give feedback.
0 replies
-
Threads cannot be forcibly cancelled. Your threaded code needs to periodically check if it has been cancelled, and return if it is. Have a look a the example in the guide for how to do that... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a worker that sometimes needs to be aborted by clicking a button, when I call the cancel_all() method, it does cancel, which I know from on_worker_state_changed. But the problem is that the operations that the running worker performed are not canceled. To give an example, we can take a for loop that will continue looping the sequence after calling cancel_all().
I may have misunderstood or done something wrong. In this case, I would be grateful if you could point out the errors and how this situation can be resolved.
Beta Was this translation helpful? Give feedback.
All reactions