• Post Reply Bookmark Topic Watch Topic
  • New Topic

sleep

 
Leandro Oliveira
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does the sleep method of class thread causes the current thread to release de lock on an object???
for example, calling sleep, will cause the current thread to release the lock on an object and then another thread will be able to get a lock on that object???
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, sleep() does not release any locks. However wait() does. See the API for more details.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!