in my main application C++ builder, I create thread (Object TThread) to process file when i have a file in the list. At same times, I need to keep the number of running thread.
i don't see how to do that? Any suggestion?
Thank you.
in my main application C++ builder, I create thread (Object TThread) to process file when i have a file in the list. At same times, I need to keep the number of running thread.
i don't see how to do that? Any suggestion?
Thank you.
You know when you are creating a new instance of your thread class. Simply keep a counter of how many instances you create. When each thread finishes, you can use its OnTerminate
event to decrement your counter.