From 36a9766c40f2d4a8d7b9ae26da40fa41411bdda9 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Mon, 20 May 2024 20:54:52 +0300 Subject: [PATCH] work around windows --- codex/slots/proofs/backends/asynccircoms.nim | 3 +-- codex/utils/asyncthreads.nim | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codex/slots/proofs/backends/asynccircoms.nim b/codex/slots/proofs/backends/asynccircoms.nim index 50bff86b..8d3675b2 100644 --- a/codex/slots/proofs/backends/asynccircoms.nim +++ b/codex/slots/proofs/backends/asynccircoms.nim @@ -31,8 +31,7 @@ proc prove*[H]( ): Future[?!CircomProof] {.async.} = ## Generates proof using circom-compat asynchronously ## - let queueRes: ?!SignalQueuePtr[?!CircomProof] = newSignalQueue[?!CircomProof](maxItems = 1) - without queue =? queueRes, err: + without queue =? newSignalQueue[?!CircomProof](maxItems = 1), err: return failure(err) proc spawnTask() = diff --git a/codex/utils/asyncthreads.nim b/codex/utils/asyncthreads.nim index abad4cf9..40e94103 100644 --- a/codex/utils/asyncthreads.nim +++ b/codex/utils/asyncthreads.nim @@ -35,7 +35,8 @@ proc newSignalQueue*[T]( result = success cast[ptr SignalQueue[T]](allocShared0(sizeof(SignalQueue[T]))) let sigRes = ThreadSignalPtr.new() if sigRes.isErr(): - return failure(sigRes.error()) + let msg: string = sigRes.error() + return failure((ref CatchableError)(msg: msg)) result[].signal = sigRes.get() result[].chan.open(maxItems)