Java's ThreadPoolExecutor equivalent for C#?
Posted
by chillitom
on Stack Overflow
See other posts from Stack Overflow
or by chillitom
Published on 2010-05-03T15:16:41Z
Indexed on
2010/05/03
15:28 UTC
Read the original article
Hit count: 295
c#
|threadpool
Hi Guys,
I used to make good use of Java's ThreadPoolExecutor class and have yet to find a good equivalent in C#. I know of ThreadPool.QueueUserWorkItem which is useful in many cases but no good if you want to control the number of threads assigned to a task or have multiple individual queues for different task types.
For example I liked to use a ThreadPoolExecutor with a single thread to guarantee sequential execution of asynchronous calls.. Is there an easy way to do this in C#? Is there a non-static thread pool implementation?
Thanks,
T.
© Stack Overflow or respective owner