fix nim c -r /Users/elcritch/projs/status/nim-codex/tests/codex/slots/testprover.nim

This commit is contained in:
Jaremy Creechley 2024-05-20 19:23:53 +03:00
parent 695686ad2c
commit 9986d22c71
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
2 changed files with 9 additions and 2 deletions

View File

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

View File

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