From 54edcb1ce7702efe0db77f4fdf89539686c08863 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Fri, 17 May 2024 01:41:19 +0300 Subject: [PATCH] fix spwan --- codex/slots/proofs/backends/asynccircoms.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codex/slots/proofs/backends/asynccircoms.nim b/codex/slots/proofs/backends/asynccircoms.nim index 205a7348..eaafb1b7 100644 --- a/codex/slots/proofs/backends/asynccircoms.nim +++ b/codex/slots/proofs/backends/asynccircoms.nim @@ -54,7 +54,9 @@ proc prove*[H]( return failure(err) let args = ProveTaskArgs(signal: signal, params: self.params) - let flowvar = self.tp.spawn proveTask(args, input) + proc spawnTask(): Flowvar[Result[CircomProof, string]] = + self.tp.spawn proveTask(args, input) + let flowvar = spawnTask() without taskRes =? await awaitThreadResult(signal, flowvar), err: let res: ?!CircomProof = failure(err)