-
-
Notifications
You must be signed in to change notification settings - Fork 572
Propagate Java thread interruption in unsafeRunSync et al. #4166
Copy link
Copy link
Closed
Labels
Description
We want to handle it similarly to the TimeoutException
cats-effect/std/jvm/src/main/scala/cats/effect/std/DispatcherPlatform.scala
Lines 58 to 65 in 725a4cd
| 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 | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done