I have a number crunching function, so I have paralleled it by using PPL..however another developer requires this function to be run in serial because of some reason..I need to give a parameter so that he can call my function in serial mode...I dont want to duplicate the code so I need a way to limit the number of PPL threads..Although I have sad
Concurrency::SchedulerPolicy sp( 1, Concurrency::MaxConcurrency, 1 );
CurrentScheduler::Create(sp);
PPL creates two threads and running my code in parallel...Any suggestions how to serialize a ppl enhanced code.