Skip to content

POC: plugging the cancelable leak - #3491

Closed
armanbilge wants to merge 13 commits into
typelevel:series/3.xfrom
armanbilge:issue/3474
Closed

POC: plugging the cancelable leak#3491
armanbilge wants to merge 13 commits into
typelevel:series/3.xfrom
armanbilge:issue/3474

Conversation

@armanbilge

Copy link
Copy Markdown
Member

Implements a proof-of-concept for my proposal in #3474 (comment).

To re-iterate:

  1. IO.Cancelable[+A](ioa: IO[A], cancel: IO[Unit]) is now a primitive operation
  2. When you enter a Cancelable, it exposes its cancel operation as part of the fiber.cancel.
  3. By leaning into uncancelable semantics, this guarantees that the final result of ioa (be it success, error, or cancellation) will always be propagated.

As such, it plugs the leak.

@djspiewak djspiewak closed this Mar 8, 2026
@durban durban mentioned this pull request Jul 7, 2026
reardonj added a commit to reardonj/cats-effect that referenced this pull request Jul 18, 2026
In IO, cancelable can be implemented without hoisting the operation to a separate thread, by invoking the callback when cancelation is requested. Partly based on Arman's previous attempt in typelevel#3491

Co-authored-by: Arman Bilge <armanbilge@gmail.com>
reardonj added a commit to reardonj/cats-effect that referenced this pull request Jul 18, 2026
In IO, cancelable can be implemented without hoisting the operation to a separate thread, by invoking the callback when cancelation is requested. Partly based on Arman's previous attempt in typelevel#3491

Co-authored-by: Arman Bilge <armanbilge@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants