Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
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:
Programmer Certification (OCPJP)
Synchronization
Sundeep Gupta
Greenhorn
Posts: 13
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
Does a
thread
releases lock on all the objects when it calls wait() on an object, or only the lock of that specific object is released.
I think other object's lock will be held with thread.
Tell me whether i'm right or wrong
Thanks,
Sundeep
SCJP 5.0
Henry Wong
author
Posts: 23951
142
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
wait() will only release the lock on the object that you are waiting on.
Henry
Books:
Java Threads, 3rd Edition
,
Jini in a Nutshell
, and
Java Gems (contributor)
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Help!
// object lock doubt
notifyall
how to acquire a lock on object.
Thread locks
More...