arrow-fx / arrow.fx.extensions.io.bracket / arrow.Kind / guarantee
@JvmName("guarantee") fun <A> Kind<
ForIO
, A>.~~guarantee~~(finalizer: Kind<
ForIO
,
Unit
>):
IO
<A>
Deprecated: The IO datatype and it’s related type classes will disappear in Arrow 0.13.0. All useful operations are offered directly over suspend functions by Arrow Fx Coroutines. https://arrow-kt.io/docs/fx/async/
Executes the given finalizer
when the source is finished, either in success or in error, or if cancelled.
As best practice, it’s not a good idea to release resources via guaranteeCase
in polymorphic code.
Prefer bracket for the acquisition and release of resources.
See Also
Do you like Arrow?
✖