Answer the question
In order to leave comments, you need to log in
How to control the number of threads in C#?
Hello.
The problem is that you need to manage the number of threads. That is, the task is the following, for example, start 5 threads out of 5 threads finished 1. So the other 4 threads work to the end, but we create another thread and add it to the pool. How to manage flows? Where to look in terms of implementation?
Answer the question
In order to leave comments, you need to log in
Everything has already been implemented: https
:
//docs.microsoft.com/ru-ru/dotnet/api/system... dotnet/api/system... https://docs.microsoft.com/en-us/dotnet/api/system...
One thread finished and ticked "I'm all". The control thread saw the checkbox and started another thread.
The checkbox can be replaced with a semaphore.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question