This commit is contained in:
Jaremy Creechley 2023-09-26 19:35:25 -07:00
parent 7169a7d20f
commit 2d843857cd
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
2 changed files with 3 additions and 4 deletions

View File

@ -63,17 +63,17 @@ var ctxLock: Lock
ctxLock.initLock()
proc setCancelled[T](ctx: TaskCtx[T]) =
withLock(ctxLock):
# withLock(ctxLock):
ctx[].cancelled = true
proc setRunning[T](ctx: TaskCtx[T]): bool =
withLock(ctxLock):
# withLock(ctxLock):
if ctx[].cancelled:
return false
ctx[].running = true
return true
proc setDone[T](ctx: TaskCtx[T]) =
withLock(ctxLock):
# withLock(ctxLock):
ctx[].running = false
proc acquireSignal(): ?!ThreadSignalPtr =

View File

@ -40,7 +40,6 @@ template queryTests*(ds: Datastore, extended = true) {.dirty.} =
var res: seq[QueryResponse]
for pair in iter:
let (key, val) = (await pair).tryGet
echo "test:query:result: ", $key
if key.isNone:
break
res.add((key, val))