Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Threads
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Threads and Synchronization
Simple Question
Mathew Kuruvilla
Ranch Hand
Posts: 145
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Suppose I have a synchronized method which calls wait, but no other methods in the program calls notify or notifyAll, does it wait forever? Or is there some kind of timeout mechanism for wait.
Jose Botella
Ranch Hand
Posts: 2120
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Consult the API. wait(long), and wait(long, int) are suitable.
Aslo you can interrupt a waiting
thread
SCJP2. Please Indent your code using UBB Code
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Regarding Join method in Threads
difference between wait state and block state
Thread.Sleep
Threads (wait method)
wait() and waitForAll()
More...