Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unlocking all locks when GUI shuts down ?

 
Daniel Breitner
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More a technical question:

When I use something like this:




Does this also unlock the lock when the GUI is closed ?
Is finally called when the GUI receives a shutdown request?
 
Ehsan Rahman
Ranch Hand
Posts: 59
Chrome Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Daniel Breitner wrote:
Is finally called when the GUI receives a shutdown request?


Hi Daniel,

Quick test:



Outputs ....



So the shutdown sequence does not ensure the finally block gets executed. Does this help?

EDIT: Updated the code to call exit() from another thread.
 
Daniel Breitner
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, this certainly helps!
Thank you very much for your effort

Now I know that I have to deal with this situation and I also have to deal with it on the server side.
There it might be that several locks are still being hold by clients and

1) I have to prevent thatnew locks are being given to clients

2) I have to use a timeout to let all locks being unlocked ...

 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Daniel,

That will be one of the drawbacks of a thick/fat client. Before you start coding like a lunatic, maybe you can read this thread or this one first.

Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic