Joys of cancelling a TBB task group

A Blender issue #152467 (&ldquo;File Browser thumbnail cache broken with large amount of images&rdquo;) reminded me to write this up. This particular issue is a (documented) surprise that when you have a parallel_for in TBB, some of the loop iterations might not execute at all, if the task group gets cancelled.&#xA;Similar to C++ exceptions, the effect is &ldquo;global&rdquo; - something might…