Looking at the Concurrency Analyzer, Threads view it appears my application produces far, far more threads than I would have thought. Most of these are either a "CLR Worker Thread" or a "Worker Thread".
What are the differences? Under what circumstances are each created?
The CLR thread pool contains two kinds of threads—the worker threads and the I/O completion port or IOCP threads. That means your ASP.Net worker process actually contains two thread pools: the worker thread pool and the IOCP thread pool. Naturally, these pools have different purposes.
People use the word "worker" when they mean a thread that does not own or interact with UI. Threads that do handle UI are called "UI" threads. Usually, your main (primary) thread will be the thread that owns and manages UI. And then you start one or more worker threads that do specific tasks.
These are worker threads are further divided logically into two types, one is worker threads which are used to process CPU-intensive logic i.e., it mostly used CPU to execute its logic like any calculations, etc.., and another is I/O threads, these threads are used to perform I/O requests or time-consuming requests ...
A “worker thread” is just a thread which runs to perform some background work on the order of his boss(we can call it “client” ) and update work result to the client.
Concurrency Visualizer is a pretty new but really cool! feature so there are a bit (I believe yet) of information regarding it, below what I've found in official information sources like MSDN:
Useful links:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With