I tested different projects with this simple code : ( 2010 ,4.5.1)
bool a, b;
new Thread(() => { a = Thread.CurrentThread.IsThreadPoolThread; }).Start();
Task.Factory.StartNew(() => { b = Thread.CurrentThread.IsThreadPoolThread; });
I wanted to see which projects uses threadpool thread and which doesn't : ( as a default(!) invocation without LongOperation switch)
So :
WPF
— Doesn't use threadpool threads.
Console
— Doesn't use threadpool threads.
Winform
— Doesn't use threadpool threads.
Asp.net
— Does use for Task
It's actually the last place I'd think about - that asp.net uses threadpool thread for task. ( each threadpool thread is important for serving other requests)
Question
Why does Only asp.net uses threadpool thread when creating/running new task ? ( Also , with the fact that Tp threads are precious resource)