This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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


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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: A question about thread? Can you help me?
 
jQuery in Action, 3rd edition