System.Threading.ThreadPool

We can use a thread pool to share and recycle threads.
This is an overhead incurred every time we start a thread
What does a thread pool help with


get the number of requests to the thread pool that can be concurrently active
get the number of idle threads that the thread pool maintains in anticipation of new requests
get the number of available threads
set the number of requests that can be active concurrently


System.Threading.ThreadPool 

A thread pool can define a threshold on the total number of worker threads that can run concurrently.
Pooled threads are always background threads.




There are several different ways you can add threads to a Thread Pool
(1) Background Worker
(2) Asynchronous Delegates
(3) Task Parallel Library (TPL)
(4) PLINQ


Pooled threads are always background threads



© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext