fix nim c -r /Users/elcritch/projs/status/nim-codex/tests/codex/slots/testprover.nim
This commit is contained in:
parent
695686ad2c
commit
9986d22c71
|
@ -1,6 +1,7 @@
|
|||
import std/options
|
||||
|
||||
import pkg/taskpools
|
||||
import pkg/chronicles
|
||||
import pkg/chronos
|
||||
import pkg/chronos/threadsync
|
||||
import pkg/questionable/results
|
||||
|
@ -10,6 +11,9 @@ import ../../../utils/asyncthreads
|
|||
|
||||
import ./circomcompat
|
||||
|
||||
logScope:
|
||||
topics = "codex asyncprover"
|
||||
|
||||
type AsyncCircomCompat* = object
|
||||
circom*: CircomCompat
|
||||
tp*: Taskpool
|
||||
|
|
|
@ -22,8 +22,11 @@ proc release*[T](queue: SignalQueuePtr[T]): ?!void =
|
|||
queue[].chan.close()
|
||||
if err =? queue[].signal.close().mapFailure.errorOption():
|
||||
queue[].signal = nil
|
||||
result = failure(err.msg)
|
||||
deallocShared(queue)
|
||||
deallocShared(queue)
|
||||
return failure(err.msg)
|
||||
else:
|
||||
deallocShared(queue)
|
||||
return success()
|
||||
|
||||
proc newSignalQueue*[T](maxItems: int = 0): ?!SignalQueuePtr[T] =
|
||||
## Create a signal queue compatible with Chronos async.
|
||||
|
|
Loading…
Reference in New Issue