Skip to main content
added 68 characters in body
Source Link
dknaack
  • 60.7k
  • 28
  • 166
  • 211

Description

You can do this using the ThreadPool.SetMaxThreads method.

But there are some problems using the ThreadPool for WebRequest. Read, for example, this (Bug in ThreadPool or HttpWebRequest?)

Sample

ThreadPool.SetMaxThreads(2,2); 

Edit

Personally i would use AsParallel from Linq, for this.

More Information

Description

You can do this using the ThreadPool.SetMaxThreads method.

Sample

ThreadPool.SetMaxThreads(2,2); 

More Information

Description

You can do this using the ThreadPool.SetMaxThreads method.

But there are some problems using the ThreadPool for WebRequest. Read, for example, this (Bug in ThreadPool or HttpWebRequest?)

Sample

ThreadPool.SetMaxThreads(2,2); 

Edit

Personally i would use AsParallel from Linq, for this.

More Information

Source Link
dknaack
  • 60.7k
  • 28
  • 166
  • 211

Description

You can do this using the ThreadPool.SetMaxThreads method.

Sample

ThreadPool.SetMaxThreads(2,2); 

More Information