I used to use the Java class ThreadPoolExecutor and have not yet found a good equivalent in C #. I know ThreadPool.QueueUserWorkItem, which is useful in many cases, but not suitable if you want to control the number of threads assigned to a task, or have several separate queues for different types of tasks.
For example, I liked using a ThreadPoolExecutor with a single thread to ensure that asynchronous calls are made sequentially. Is there an easy way to do this in C #? Is there a non-stationary implementation of a thread pool?
source share