I found this question that was very useful in learning the basics of the ThreadPool.
Now my questions lies in using the ThreadPool for a series of "tasks", like the Fibonacci class, but wanting to have at most n number of these tasks executing at any one time, or basically limiting these tasks as they execute in the ThreadPool to a maximum of n threads and spawning new ones as executing tasks are completed.
Is this doable using a for loop, a task counter, and then WaitHandle::WaitAny().
Or rather would this be a bad implementation and should I be trying some other multithreaded approach?
Update:
Retagged as c++-cli, not c++.