I would like to request an enhancement of TBB loop patterns: if the Task Scheduler is limited to a single thread, the behavior of parallel for/do/other loops should be sequential and completely backward compatible to a single-thread execution.
Motivation: we are moving legacy single-threaded code to parallel execution, we need to keep backward compatibility. Users that do not choose to use the new parallel features should experience no behavior change.
As for now, I have to maintain 2 code streams: parallel and single-threaded. This complicates the development and the result code.
It seems that enabling backward compatibility for a single thread is not complicated and will not add performance overhead for TBB parallel loops.