Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

deadlock

 
Maksym Odintsov
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. In order to avoid a deadlock in my program a user must call lock then update or delete and then unlock methods. User can't lock a record before he unlocks the previous. But what if the clients machine will crash for some reasons. what if for example the user will call lock then update and then he will crash. If this happen my program will deadlock. So do I nead to solve this problem at all ? And if I do please tell how can I do it.
 
Roberto Perillo
Bartender
Posts: 2273
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mentioned this in my choices.txt file (that this could happen), but the chances of this happening are so remote that I did not bother about it.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!