Promise.finish

Registers a finalization handler, which is called when the promise is resolved (either fulfilled or rejected). Roughly equivalent to then(value => onResolved(), error => onResolved()). Similar to the finally method in JavaScript promises.

class Promise(T, E : Throwable = Exception)
Promise!(R, F)
finish
(
R
F = E
)
(
R delegate
()
onResolved
)

Meta