Skip to content

Commit

Permalink
Test cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kloch committed Nov 12, 2024
1 parent 212281a commit 5c9d34c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ class DispatcherJVMSpec extends BaseSpec {
val res = Dispatcher.parallel[IO](await = true).evalMap { dispatcher =>
for {
canceled <- Deferred[IO, Unit]
io = IO.sleep(1.second).onCancel(IO.println("canceled") >> canceled.complete(()).void)
io = IO.sleep(1.second).onCancel(canceled.complete(()).void)
thread = new Thread(() =>
try dispatcher.unsafeRunSync(io)
catch { case _: InterruptedException => println("interrupted") })
catch { case _: InterruptedException => })
_ <- IO(thread.start).as(thread)
_ <- IO.sleep(100.millis)
_ <- IO(thread.interrupt())
Expand Down

0 comments on commit 5c9d34c

Please sign in to comment.