mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-02 13:43:11 +00:00
test task cancel
This commit is contained in:
parent
0df63d6102
commit
374e5a891f
@ -200,7 +200,7 @@ for i in 1..N:
|
||||
|
||||
proc wait(flag: var Atomic[bool], name = "task") =
|
||||
# echo "wait for " & name & " to be ready..."
|
||||
defer: echo ""
|
||||
# defer: echo ""
|
||||
for i in 1..100:
|
||||
# stdout.write(".")
|
||||
if flag.load() == true:
|
||||
@ -214,7 +214,7 @@ for i in 1..N:
|
||||
discard ctx[].signal.fireSync()
|
||||
ready.store(true)
|
||||
ms.wait()
|
||||
# echo "ctx:task: ", ctx[]
|
||||
echo "task context memory: ", ctx[]
|
||||
(?!ThreadTestInt).ok(default(ThreadTestInt))
|
||||
|
||||
proc runTestTask() {.async.} =
|
||||
@ -247,4 +247,3 @@ for i in 1..N:
|
||||
ms.fire()
|
||||
flag.wait("flag")
|
||||
check flag.load() == true
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user