New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to cancel taskflow that has executed future.get()? #555
Comments
Hi @QiuYilin , I don't understand your question. Basically, when an exception is thrown, the taskflow runtime will try to cancel that running taskflow. Is this something you were asking for? |
I want to actively interrupt the task even if there is no error. Now I think I should create my own breakpoint, pass the flag so that the breakpoint throws an exception, so as to achieve the effect instead of using future.cancel(). |
I think you are referring to something like coroutine that you can suspend a task at any point? If yes, this is something currently we are working on. |
What I mean is that the task can be interrupted, but it does not affect the acquisition of exceptions without interruption.What I need may be InterruptableThread, I don't need to continue executing the interrupted task. |
I need to grab the exception for each task. like this:
Then the thread will be blocked because of future's feature. The cancel() method won't work after get().Is there any way to catch exceptions while retaining the ability to interrupt tasks?
The text was updated successfully, but these errors were encountered: