| Author |
sleep()
|
Matthew B
Greenhorn
Joined: Jul 14, 2002
Posts: 1
|
|
|
Will calling sleep on a thread release the threads lock an an obect/class?
|
 |
Anthony Villanueva
Ranch Hand
Joined: Mar 22, 2002
Posts: 1055
|
|
No. See the sample code below:
|
 |
Mr. C Lamont Gilbert
Ranch Hand
Joined: Oct 05, 2001
Posts: 1158
|
|
This comes directly from the SDK. Try to read the docs, they contain the information you seek. sleep public static void sleep(long millis) throws InterruptedExceptionCauses the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds. The thread does not lose ownership of any monitors. Parameters: millis - the length of time to sleep in milliseconds. Throws: InterruptedException - if another thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown. See Also: Object.notify()
|
 |
 |
|
|
subject: sleep()
|
|
|