This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes A question about thread? Can you help me? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "A question about thread? Can you help me?" Watch "A question about thread? Can you help me?" New topic
Author

A question about thread? Can you help me?

Kenny Smith
Greenhorn

Joined: Jan 08, 2002
Posts: 9
Is the statement right:
If you call the sleep() on the Thread class, the current-executing thread gives up the locks it has.


Kenny Smith
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Have you bothered looking up the javadoc?
- Peter
[ January 08, 2002: Message edited by: Peter den Haan ]
Laudney Ren
Ranch Hand

Joined: Jan 06, 2002
Posts: 111
According to the j2se 1.3 API, both of the two sleep methods:
public static void sleep (long millis)
public static void sleep (long millis, int nanos)
do not lose ownership of any monitors.


" Veni, vidi, vici "<br />" I came, I saw, I conquered "
Kenny Smith
Greenhorn

Joined: Jan 08, 2002
Posts: 9
I see and thanks all of you guys!
 
Consider Paul's rocket mass heater.
 
subject: A question about thread? Can you help me?
 
Similar Threads
Clear form
Servlet Running in Infinite loop
Thread, Runnable and their run() method
Jakob Nielsen Declares the Letter "C" Unusable
Threads..join() method