Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ lazy val rootJVM = project
core.jvm,
testkit.jvm,
tests.jvm,
ioAppTestsJVM,
std.jvm,
example.jvm,
graalVMExample,
Expand Down
8 changes: 5 additions & 3 deletions tests/shared/src/main/scala/catseffect/examples.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ package examples {
} catch {
case _: TimeoutException => println("sadness (timeout)")
}
Thread.sleep(500L)
// by now the WSTP (and all its threads) must've been shut down:
if (thread eq null) println("sadness (thread is null)")
else if (thread.isAlive()) println("sadness (thread is alive)")
else {
thread.join(2000L)
// by now the WSTP (and all its threads) must've been shut down:
if (thread.isAlive()) println("sadness (thread is alive)")
}
println("done")
}
}
Expand Down
Loading