title: Can I configure the number of threads used by Parallel Extensions?
body: <p>I'm currently using the Parallel Extensions that are part of <a href="http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx" rel="nofollow noreferrer">Reactive Extensions for .Net(Rx)</a>. I believe they are also available through .Net 4 beta releases.</p>
  
  <p>1) Is there any way to determine how many threads are actually being utilized. I assume this is related to <code>Environment.ProcessorCount</code> (# of logical cores) but I want to check this.</p>
  
  <p>2) Is there any way of configuring how many thread you wish to use? I noticed there is a <code>ParallelOptions.MaxDegreeOfParallelism</code> property that looks promising but it appears to default to -1 (no limit to the number of threads) and I'm also not quite sure if this can be set once for the current application, as opposed to being passed in to each call to <code>Parallel.For()</code>, etc.</p>