Without recompilation you can try to use setNumThreads(0). As the result, parallel_for_ will not be executed, and only one thread will work.