I'm seeking advice on efficiently managing a significant number of background tasks in Delphi 10.4, utilizing the OmniThreadLibrary.
Specifically, I aim to handle around 500 tasks for computation purposes. To prevent these tasks from consuming all system resources, I'd like to limit the number of concurrent threads (e.g., 5, 10, 15). Additionally, I want to ensure that once one task completes processing, another task starts until all tasks are finished.
I would appreciate any guidance, examples, or suggestions on effectively achieving this objective using Delphi and OmniThreadLibrary. Thank you for your assistance!
I explored the possibility of using the scheduling mechanism, but it didn't yield a satisfactory solution.