ThreadPool Class on MSDN. (for .NET 2.0)
Notes:
* one thread monitors the status of several operations queued to the thread pool
* all threads are background threads => will not keep the application running
* add items not related to a wait operation using QueueUserWorkItem. There is no way to cancel a work item after it has been queued.
* 250 threads and 1000 I/O completion threads / available processor
* there is a minimum number of idle threads = number of processors. They are checked/created at a 0.5 sec interval
Example # 1 (www.java2s.com/Code/CSharp/Thread/ThreadPoolSample.htm)
Note: no sleep time causes all the threads to run until they are finished, then switch to the next one.
Post a Comment