On Sun, 19 Dec 2010 10:50:08 +0100
Joost 't Hart <joost.t.h...@planet.nl> wrote:

> >> Quoting the documentation:
> >>
> >> /Suspends the calling thread for at least the supplied period./
> >>
> >> What does "at least" mean here? Is there also an "at most"? I do not
> >> want my friend to end up in cyberspace. :-)
> >
> > Nope, there isn't :) In ordinary multitasking environment there is no 
> > guarantee on upper bound.
> >
> 
> Surely got that bit, but I guess it makes sense to refer a bit more to 
> some good old thread state names: After (exactly!) the given period of 
> "suspension" the thread returns into "ready" state.
> When (if ever) it will become the "running" thread again depends ...

This all nice in theory, but are you sure that every sleep() causes setting of 
hardware timer? In every OS? In every minor version of OS even? If not (and I'm 
pretty sure it's not so), then you need to add more details. All about how 
scheduler works. Or this precise talk on what happen after time is up would 
just mislead people. Aside from the fact that sometime after time is up thread 
would become runnable again (which is really obvious, no?) there is nothing to 
say.

-- 
Nick Voronin <elfy...@gmail.com>

Reply via email to