Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I don't even get why you would Sleep() in such a scenario.

If you don't want two of the process running at once for any reason, a check-do-sleep loop can be easier to reason than debouncing an interrupt based approach. Less efficient, but often efficient enough especially if you are just throwing something together quickly with a view to if being PoC or a temporary utility.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: