work around windows - no without
This commit is contained in:
parent
26809823ed
commit
9dcf56b5f5
|
@ -30,9 +30,10 @@ proc prove*[H](
|
|||
self: AsyncCircomCompat, input: ProofInputs[H]
|
||||
): Future[?!CircomProof] {.async.} =
|
||||
## Generates proof using circom-compat asynchronously
|
||||
##
|
||||
without queue =? newSignalQueue[?!CircomProof](maxItems = 1), err:
|
||||
return (?!CircomProof).err(err)
|
||||
let queueRes = newSignalQueue[?!CircomProof](maxItems = 1)
|
||||
if queueRes.isErr:
|
||||
return failure queueRes.error()
|
||||
let queue = queueRes.get()
|
||||
|
||||
proc spawnTask() =
|
||||
self.tp.spawn proveTask(self.circom, input, queue)
|
||||
|
@ -83,7 +84,9 @@ proc verify*[H](
|
|||
|
||||
success(verified)
|
||||
|
||||
proc init*(_: type AsyncCircomCompat, params: CircomCompatParams, tp: Taskpool): AsyncCircomCompat =
|
||||
proc init*(
|
||||
_: type AsyncCircomCompat, params: CircomCompatParams, tp: Taskpool
|
||||
): AsyncCircomCompat =
|
||||
## Create a new async circom
|
||||
##
|
||||
let circom = CircomCompat.init(params)
|
||||
|
|
|
@ -35,8 +35,7 @@ proc newSignalQueue*[T](
|
|||
let queue = cast[ptr SignalQueue[T]](allocShared0(sizeof(SignalQueue[T])))
|
||||
let sigRes = ThreadSignalPtr.new()
|
||||
if sigRes.isErr():
|
||||
let msg: string = sigRes.error()
|
||||
return failure((ref CatchableError)(msg: msg))
|
||||
return failure((ref CatchableError)(msg: sigRes.error()))
|
||||
else:
|
||||
queue[].signal = sigRes.get()
|
||||
queue[].chan.open(maxItems)
|
||||
|
|
Loading…
Reference in New Issue