GeeCON Prague 2014*
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


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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A question about thread? Can you help me?