cancelable method

IO<A> cancelable(
  1. IO<Unit> fin
)

Starts this IO as a fiber and joins it, attaching fin as a finalizer that is run when the outer IO is canceled. This allows a background fiber to be canceled with a custom cleanup action rather than the default cooperative cancellation.

Implementation

IO<A> cancelable(IO<Unit> fin) => _cancelable(fin).traced('cancelable');