title: How to set number of PPL threads to one?
body: <p>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</p>
  
  <pre><code>Concurrency::SchedulerPolicy sp( 1, Concurrency::MaxConcurrency, 1 );
  CurrentScheduler::Create(sp);
  </code></pre>
  
  <p>PPL creates two threads and running my code in parallel...Any suggestions how to serialize a ppl enhanced code.</p>