Don't forever sleep, because that's stupid and you expose yourself to a race condition (when you've entered the loop but before you've slept) that will hang you.