A "busy loop" or more commonly "busy wait" is an active polling where the application is waiting on some event to occur and continuously checks for it. Typically this includes a timed sleep or other task which gives up CPU time so that another process can provide the expected input.
Contrast this with a callback. While waiting on a callback, the program consumes no CPU cycles. Typically the program will "register" a callback routine which some monitoring application invokes based on some event.
The distinction is that the program in a busy-loop consumes CPU and time slices while waiting while the callback mechanism allows a program to consume no (or almost no) CPU while waiting.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…