Tasks Cancellation (What for?)

Tasks Cancellation (What for?)

Hello everyone,TBB offers tasks cancelation in its model, so a TBB developper can cancel tasks during runtime.What I would like to know is the reason behind adding this cancelation model to TBB. What kind of algorithms/applications may use cancelation? Are there any TBB applications source code examples out there?Thank you

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

There are examples of its use in the Intel TBB tutorial document available attheopen source website. It is primarily a performance call, to instruct the scheduler to discard sets of queued tasks once a reason has been provided to abort their execution. There can be a number of reasons to cancel tasks: in response to an exception from the system, perhaps as a means to provide a user interrupt for long duration tasks within an application, or just to terminate an exhaustive search once some thread has found the target but perhaps before all the other threads have finished their search lists. Read about it in the tutorial.

Thank you Robert for your reply that was helpful.

Leave a Comment

Please sign in to add a comment. Not a member? Join today