mirror of
https://github.com/logos-storage/apatheia.git
synced 2026-01-02 13:03:11 +00:00
got together
This commit is contained in:
parent
bcaeda748f
commit
e86a7f6727
@ -11,14 +11,13 @@ import apatheia/tasks
|
||||
## todo: setup basic async + threadsignal + taskpools example here
|
||||
##
|
||||
|
||||
|
||||
proc addNums(a, b: float): float {.asyncTask.} =
|
||||
os.sleep(500)
|
||||
os.sleep(100)
|
||||
echo "adding: ", a, " + ", b
|
||||
return a + b
|
||||
|
||||
proc addNumValues(vals: openArray[float]): float {.asyncTask.} =
|
||||
os.sleep(500)
|
||||
os.sleep(100)
|
||||
result = 0.0
|
||||
for x in vals:
|
||||
result += x
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user