Thread.Sleep()
807589Sep 2 2008 — edited Sep 4 2008Hi,
I have a threading doubt.
When we say:
Thread.Sleep(5000);
Is it guaranteed that the thread would sleep for 5sec? From what I know, the JVM is free to wake up any thread anytime it wants. So the above line of code does not necessarily guarantee that the thread would sleep. It would in most of the cases, but it is still not guaranteed.
Am I right? Any insights into this?
Thanks.