Forums Register Login
on page 510 k&B,
It says that you can't be certain that how long a thread will actually run before it gets put to sleep.

I want to know whether the thread will sleep with each iteration or can it skip the sleep method and will sleep arbitrarily.

Pls. let me know.

Mohit Agarwal
Would Be SCJP.

([C0DE][/C0DE] tags added)

"The will to win is worthless if you do not have the will to prepare"
[ September 30, 2004: Message edited by: Barry Gaunt ]
It will sleep for at least 5 seconds during each of three iterations. Provided another thread does not interrupt the thread when its sleeping.
[ September 30, 2004: Message edited by: Barry Gaunt ]
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter

This thread has been viewed 404 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 20, 2018 04:56:32.