There is a 'break' in my for loop so that in case it finds out the result, it quits the loop. When I apply parallel_for() on the loop, the 'break' in operator() can only terminate current task. However, tasks mapped to other thread or tasks not mapped yet will keep running. I am wondering if I can kill these tasks if break condition meet. Thanks a lot.
Implementation of 'break' in parallel_for()