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

Propagate Java thread interruption in unsafeRunSync et al. #4166

Closed
armanbilge opened this issue Nov 12, 2024 · 0 comments
Closed

Propagate Java thread interruption in unsafeRunSync et al. #4166

armanbilge opened this issue Nov 12, 2024 · 0 comments

Comments

@armanbilge
Copy link
Member

We want to handle it similarly to the TimeoutException

def unsafeRunTimed[A](fa: F[A], timeout: Duration): A = {
val (fut, cancel) = unsafeToFutureCancelable(fa)
try Await.result(fut, timeout)
catch {
case t: TimeoutException =>
cancel()
throw t
}

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

No branches or pull requests

2 participants