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

[core] fix IOPromise exception handling #933

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

fwbrasil
Copy link
Collaborator

@fwbrasil fwbrasil commented Dec 15, 2024

I noticed an odd scenario in a project I'm working on. The IOPromise flushing was throwing an exception due to a buggy onInterrupt function in the project. This PR ensures exception handling is present in all callback function evaluations.

@@ -49,11 +49,7 @@ private[kyo] class IOPromise[+E, +A](init: State[E, A]) extends Safepoint.Interc
case l: Linked[E, A] @unchecked =>
interruptsLoop(l.p)
case _ =>
try discard(other.interrupt(Result.Panic(Interrupt(frame))))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't require exception handling. It's probably copy-and-paste leftover

@hearnadam hearnadam merged commit 3febb53 into main Dec 16, 2024
3 checks passed
@hearnadam hearnadam deleted the io-promise-exception-handling branch December 16, 2024 05:10
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