Skip to content

Commit

Permalink
Switch up execution contexts slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
James Judd committed Jul 7, 2024
1 parent 3d71a3c commit 99c7318
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ trait WorkerMain[S] {
exceptionHandler,
false,
)
implicit val ec = ExecutionContext.fromExecutor(fjp)
val ec = ExecutionContext.fromExecutor(fjp)

System.setIn(new ByteArrayInputStream(Array.emptyByteArray))
System.setOut(System.err)
Expand Down Expand Up @@ -74,7 +74,7 @@ trait WorkerMain[S] {
} catch {
case AnnexWorkerError(code, _, _) => code
}
}
}(ec)

f.onComplete {
case Success(code) => {
Expand All @@ -89,7 +89,7 @@ trait WorkerMain[S] {
System.err.println(s"Uncaught exception in Future while proccessing WorkRequest $requestId:")
e.printStackTrace(System.err)
}
}
}(scala.concurrent.ExecutionContext.global)
process(ctx)
}
process(init(Some(args.toArray)))
Expand Down

0 comments on commit 99c7318

Please sign in to comment.