Assuming you’re building this with the TPL, you can set the ParallelOptions.MaxDegreesOfParallelism to whatever you want it to be.
Parallel.For for a code example.
More Related Contents:
- Does Parallel.ForEach limit the number of active threads?
- how to use c# For(;;) in parallel [closed]
- Merge two arrays and return sorted array in c# [closed]
- Why doesn’t C# infer my generic types?
- Why isn’t there generic variance for classes in C# 4.0?
- Parallel.ForEach vs Task.Factory.StartNew
- out of memory Image.FromFile
- Dynamically adding properties to an ExpandoObject
- No Main() in WPF?
- creating WCF ChannelFactory
- Should you declare methods using overloads or optional parameters in C# 4.0?
- Cancelling a Task is throwing an exception
- When should one use dynamic keyword in c# 4.0?
- Do the new C# 5.0 ‘async’ and ‘await’ keywords use multiple cores?
- _=> what does this underscore mean in Lambda expressions?
- Impersonate user in Windows Service
- Is Graphics.DrawImage too slow for bigger images?
- Does the System.Windows.Forms.Timer run on a different thread than the UI?
- How to get first record in each group using Linq
- Why is Parallel.ForEach much faster then AsParallel().ForAll() even though MSDN suggests otherwise?
- Parallel.ForEach with adding to list
- Break parallel.foreach?
- Getting all messages from InnerException(s)?
- Why does this (null || !TryParse) conditional result in “use of unassigned local variable”?
- How to add TemplateField programmatically
- C# Xml Serialization & Deserialization
- Are C# structs thread safe?
- Partition: How to add a wait after every partition
- Wait for QueueUserWorkItem to Complete
- C#: Default implementation for == and != operators for objects