I am spawning several threads to make some Web API requests and load data into objects. They just do that job and then finish. Currently, I am using TThread.CreateAnonymousThread()
.
When those threads run, they produce a high CPU load. I thought I could decrease that load by inserting sleeps (I don’t mind the longer runtime, as it is a background job), but the CPU load still goes up.
Is Sleep(10)
the right way to lower CPU load, or are there other/better ways?
7