Joys of cancelling a TBB task group
Summary
The article discusses surprising behavior when cancelling a TBB task group in Blender, showing that parallel_for iterations can be skipped and that cancellation can interact with long-lived contexts. It analyzes the crash cause caused by nested parallelism and task-group cancellation, and argues for avoiding or carefully signaling cancellation. A standalone repro is provided, along with practical lessons for writing robust multi-threaded code.