We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4418125 commit 0843dc1Copy full SHA for 0843dc1
tests/shared/src/main/scala/catseffect/examples.scala
@@ -83,10 +83,12 @@ package examples {
83
} catch {
84
case _: TimeoutException => println("sadness (timeout)")
85
}
86
- Thread.sleep(500L)
87
- // by now the WSTP (and all its threads) must've been shut down:
88
if (thread eq null) println("sadness (thread is null)")
89
- else if (thread.isAlive()) println("sadness (thread is alive)")
+ else {
+ thread.join(2000)
+ // by now the WSTP (and all its threads) must've been shut down:
90
+ if (thread.isAlive()) println("sadness (thread is alive)")
91
+ }
92
println("done")
93
94
0 commit comments