CloseableExtensions<C extends Closeable> extension
Extension methods for Closeable
- on
-
- C
Methods
-
runAndClose<
R> (R fn(C p0)) → R -
Available on C, provided by the CloseableExtensions extension
Runs passed function and closes this resource after it Closes the resource even if the function throws. The first exception thrown is propagated, if both the function and the close throw, the exception from the function is propagated -
runAndCloseAsync<
R> (FutureOr< R> fn(C p0)) → Future<R> -
Available on C, provided by the CloseableExtensions extension
Runs passed function and closes this resource after it Closes the resource even if the function throws. The first exception thrown is propagated, if both the function and the close throw, the exception from the function is propagated