Method AsyncResult():finally() Foundation
Chains a finalization handler to execute when the operation completes.
:finally( <bFinalBlock> ) --> oAsyncResult
A new AsyncResult object representing the result of the handler.
Registers a codeblock to execute when the operation completes, regardless of whether it succeeded or failed. This method implements the promise-like finalization pattern.
The finalization handler does not receive any parameters. If the AsyncResult is already in the "finished" or "error" state, the handler is executed immediately.
This method returns a new AsyncResult object that represents the result of the handler. This allows for further chaining of success, error, and finalization handlers.
The state of the original AsyncResult is passed through to the new AsyncResult, unless the finalization handler itself throws an error.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.