mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-05 23:23:10 +00:00
test query - it runs!
This commit is contained in:
parent
f8446de638
commit
317d42c511
@ -328,9 +328,9 @@ method query*(
|
|||||||
proc next(): Future[?!QueryResponse] {.async.} =
|
proc next(): Future[?!QueryResponse] {.async.} =
|
||||||
echo "\n\nquery:next:exec: "
|
echo "\n\nquery:next:exec: "
|
||||||
let ctx = ctx
|
let ctx = ctx
|
||||||
defer:
|
# defer:
|
||||||
if lock.locked:
|
# if lock.locked:
|
||||||
lock.release()
|
# lock.release()
|
||||||
|
|
||||||
trace "About to query"
|
trace "About to query"
|
||||||
if lock.locked:
|
if lock.locked:
|
||||||
@ -340,9 +340,10 @@ method query*(
|
|||||||
echo "query:next:iter:finished"
|
echo "query:next:iter:finished"
|
||||||
return failure (ref QueryEndedError)(msg: "Calling next on a finished query!")
|
return failure (ref QueryEndedError)(msg: "Calling next on a finished query!")
|
||||||
|
|
||||||
echo "query:next:acquire:lock"
|
# echo "query:next:acquire:lock"
|
||||||
await lock.acquire()
|
# await lock.acquire()
|
||||||
|
|
||||||
|
echo "query:next:wait:signal"
|
||||||
await wait(ctx[].signal)
|
await wait(ctx[].signal)
|
||||||
|
|
||||||
if not ctx[].running:
|
if not ctx[].running:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user