• Post Reply Bookmark Topic Watch Topic
  • New Topic

wait method  RSS feed

 
MaheshS Kumbhar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a thread calls wait method of target object then the executing thread gives up locks of the target object only or does it give up all the locks it holds?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It only gives up the lock on the object that you call wait() on.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!