mirror of
https://github.com/logos-storage/apatheia.git
synced 2026-01-07 15:33:09 +00:00
fix compilation
This commit is contained in:
parent
bcab7a7aed
commit
99fcf5a92b
@ -15,6 +15,9 @@ proc addNums(a, b: float, queue: SignalQueue[float]) =
|
|||||||
echo "adding: ", a, " + ", b
|
echo "adding: ", a, " + ", b
|
||||||
discard queue.send(a + b)
|
discard queue.send(a + b)
|
||||||
|
|
||||||
|
proc addNumsRun(tp: Taskpool, queue: SignalQueue[float]) =
|
||||||
|
tp.spawn addNums(1.0, 2.0, queue)
|
||||||
|
|
||||||
suite "async tests":
|
suite "async tests":
|
||||||
|
|
||||||
var tp = Taskpool.new(num_threads = 2) # Default to the number of hardware threads.
|
var tp = Taskpool.new(num_threads = 2) # Default to the number of hardware threads.
|
||||||
@ -23,7 +26,7 @@ suite "async tests":
|
|||||||
asyncTest "test":
|
asyncTest "test":
|
||||||
|
|
||||||
echo "\nstart"
|
echo "\nstart"
|
||||||
tp.spawn addNums(1.0, 2.0, queue)
|
addNumsRun(tp, queue)
|
||||||
|
|
||||||
# await sleepAsync(100.milliseconds)
|
# await sleepAsync(100.milliseconds)
|
||||||
echo "waiting on queue"
|
echo "waiting on queue"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user