Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaky fromFutureCancelable #3891

Closed
TimWSpence opened this issue Nov 9, 2023 · 4 comments
Closed

Leaky fromFutureCancelable #3891

TimWSpence opened this issue Nov 9, 2023 · 4 comments
Labels

Comments

@TimWSpence
Copy link
Member

https://github.com/typelevel/cats-effect/blob/series/3.x/kernel/shared/src/main/scala/cats/effect/kernel/Async.scala#L268 has the potential to leak the future on cancelation due to the lack of uncancelable/poll

@armanbilge
Copy link
Member

Thanks, good catch. I think fromFuture also needs an uncancelable, and we should also check the js.Promise variants as well ...

@TimWSpence
Copy link
Member Author

Thanks, good catch. I think fromFuture also needs an uncancelable, and we should also check the js.Promise variants as well ...

I have a vague of fixing things like this before by floating the async to the top as the async registration at least used to be uncancelable. I'll push a draft PR to demonstrate and try to confirm that that still works 😅

@TimWSpence
Copy link
Member Author

OK pushed. Tomorrow I'll try to confirm that it actually does what I think it does 😅

@TimWSpence
Copy link
Member Author

Resolved by #3892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants