You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to grab the exception for each task. like this:
try{
tf::Future<void> fu = executor.run(taskflow);
fu.get();
}
catch(...){
do_something();
}
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:
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?
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().
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: