What is a busy loop?

后端 未结 3 1771
粉色の甜心
粉色の甜心 2020-12-21 16:41

Can it be a loop with or without statements?

while (1)
{
   //Empty
}

OR

int i = 0;

while (1)
{
   i++;
}
3条回答
  •  情深已故
    2020-12-21 17:21

    I'm pretty sure you're talking about busy wait where you have a loop polling for some condition every iteration.

提交回复
热议问题