High CPU Utilization and Threads

High CPU Utilization and Threads

If you implement an infinite loop in a thread you may see 50% to 100% CPU utilization. This is because even though your thread may not be doing anything waiting for some event, you are still getting CPU slices unless you make a call to give up the CPU. This is easily done by calling a sleep function such as Thread.Sleep(5000) // milliseconds

Leave a Reply