From 99c73187267066be501f1b35942d49ccdc545686 Mon Sep 17 00:00:00 2001 From: James Judd Date: Sat, 6 Jul 2024 17:42:55 -0600 Subject: [PATCH] Switch up execution contexts slightly --- .../rules_scala/common/worker/WorkerMain.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/higherkindness/rules_scala/common/worker/WorkerMain.scala b/src/main/scala/higherkindness/rules_scala/common/worker/WorkerMain.scala index f77a7d2b..e1fb7a6f 100644 --- a/src/main/scala/higherkindness/rules_scala/common/worker/WorkerMain.scala +++ b/src/main/scala/higherkindness/rules_scala/common/worker/WorkerMain.scala @@ -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) @@ -74,7 +74,7 @@ trait WorkerMain[S] { } catch { case AnnexWorkerError(code, _, _) => code } - } + }(ec) f.onComplete { case Success(code) => { @@ -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)))