VS2010 C++ Concurrency Runtime - How to force single threaded mode?
Question
In VS2010, is there a way to force a Concurrency::parallel_for() loop (or parallel_for_each) to run in serial? It would be easier for debugging.
If so, how?
Thanks
Solution
You can achieve a debug friendly build by using a define based on the _DEBUG
preprocessor symbol to map the required functions to either serial (mostly found in std) or parallel versions. Of course this means a lot of effort, your way better off learn the useful skill of MT debugging as GMan suggested
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow