cats-effect
cats-effect copied to clipboard
POC: plugging the `cancelable` leak
trafficstars
Implements a proof-of-concept for my proposal in https://github.com/typelevel/cats-effect/issues/3474#issuecomment-1459309054.
To re-iterate:
IO.Cancelable[+A](ioa: IO[A], cancel: IO[Unit])is now a primitive operation- When you enter a
Cancelable, it exposes itscanceloperation as part of thefiber.cancel. - By leaning into
uncancelablesemantics, this guarantees that the final result ofioa(be it success, error, or cancellation) will always be propagated.
As such, it plugs the leak.