Q1.Is it a good way adding "while&sleep" in order to avoid to exit main function like below?
main()
{
run thread
while(1)
sleep(0xFFFFFFFF);
}
Q2. Are the two differ in terms of CPU perspective?
Case1)
while
sleep(1);
Case2)
while
sleep(0xFFFFFFFF);
User contributions licensed under CC BY-SA 3.0