Short sleeps suffering from slack
Posted Feb 24, 2012 23:02 UTC (Fri) by giraffedata
In reply to: Short sleeps suffering from slack
Parent article: Short sleeps suffering from slack
What types of applications break when sleep(0) just returns? ...
I've seen so many poorly written programs "fix" concurrency problems with yields ...
It seems like you've answered your own question.
I have no trouble believing that these programs you've seen worked better after sleep(0) was added than before. Maybe it's just within a narrow field of application, but that may be the only field that matters. You might say these programs don't deserve to keep working, even in that narrow application, but you can't deny that making sleep() a no-op would do damage there.
to post comments)