Skip to content

Commit f163cc0

Browse files
authored
Use Blocker for Process#waitFor in slurp (#1902)
`waitFor` [blocks the calling thread][1] so it is appropriate to evaluate it on the available `Blocker`. [1]: https://docs.oracle.com/javase/8/docs/api/java/lang/Process.html#waitFor--
1 parent 8eadc12 commit f163cc0

File tree

1 file changed

+1
-1
lines changed
  • modules/core/src/main/scala/org/scalasteward/core/io

1 file changed

+1
-1
lines changed

modules/core/src/main/scala/org/scalasteward/core/io/process.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ object process {
5151
.drain
5252
}
5353

54-
val result = readOut >> F.delay(process.waitFor()) >>= { exitValue =>
54+
val result = readOut >> blocker.delay(process.waitFor()) >>= { exitValue =>
5555
if (exitValue === 0) F.pure(buffer.toList)
5656
else {
5757
val msg = s"'${showCmd(args)}' exited with code $exitValue"

0 commit comments

Comments
 (0)