work around windows

This commit is contained in:
Jaremy Creechley 2024-05-20 20:54:52 +03:00
parent ca8e938836
commit 36a9766c40
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
2 changed files with 3 additions and 3 deletions

View File

@ -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() =

View File

@ -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)