CPU time
Busy-waiting itself can be made much less wasteful by using a delay function (e.g., codice_1) found in most operating systems. This puts a thread to sleep for a specified time, during which the thread will waste no CPU time. If the loop is checking something simple then it will spend most of its time asleep and will waste very little CPU time.