Re:Windows Timer Resolution: The Great Rule Change
by gambiting on Monday October 05, 2020 @05:21AM
(#24685948)
Well, yes, I suppose technically that is correct. In our use case the thread would wake up, check if there was any work to do, if not then sleep(1). If you're doing it continuously(there is nothing to do) the thread would be sleeping for 16ms pretty much exactly every time - which meant that any time any work came in it wouldn't be picked up immediately, but anywhere between 1-16ms(which was unacceptable for this use case).
You sure? According to e.g. the article it results in "sleep anywhere between 1 and 16mSec". But this illustrates part of the problem here: arguably problematic use of Sleep() where other solutions are more appropriate and people not reading the documentation and/or not realizing what it means.