• Post Reply Bookmark Topic Watch Topic
  • New Topic

Nested locks  RSS feed

 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are nested locks and have people run into Nested Locks situation in practice?
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess nested locks is referring to possible deadlocks. You can read more on this The perils of race conditions, deadlock, and other threading problems

./pope
 
Henry Wong
author
Sheriff
Posts: 23284
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by karthik Guru:
What are nested locks and have people run into Nested Locks situation in practice?


Not sure what you mean by "nested locks"... in our book, we simply define it as the fact that Java synchronization locks can nest. It basically means when a thread that owns the lock, trys to acquire the lock, it is granted immediately. The system also keeps track of the number of times, it is acquired, so that it can free is correctly. This is actually a good thing.

If you are asking about issues with deadlock... yes, it is a big topic. We actually, spend a section on deadlock issues early on, and then later devote a whole chapter on it.

Henry
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!