I used to see Sleep(0) in some part of my code where some infinite/long while loops are available. I was informed that it would make the time-slice
Sleep(0)
while
I am using using pthreads and for some reason on my mac the compiler is not finding pthread_yield() to be declared. But it seems that sleep(0) is the same thing.