I've never used the new "finally" clause before. Is this correct usage to
ensure that both:
1) The semaphore gets released even if an exception is caught, and
2) The caught exception will be passed on up?
I.e. is the finally clause guaranteed to execute before the catch clause
raises the error again?
if updateInProgress.TrySignal then // Request permission to update
try
self.doSomething
catch err as RuntimeException
raise err // Pass err on up.
finally
updateInProgress.Release
end try
end if
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|