asyncdispatch: split asyncfutures into its own module
This slightly changes behaviour of callSoon - before loop is initialized, callSoon will call the function immediately.
This commit is contained in:
parent
9e12db4459
commit
e86863e8f5
4 changed files with 52 additions and 22 deletions
|
|
@ -17,5 +17,6 @@ proc asyncRecursionTest*(): Future[int] {.async.} =
|
|||
inc(i)
|
||||
|
||||
when isMainModule:
|
||||
setGlobalDispatcher(newDispatcher())
|
||||
var i = waitFor asyncRecursionTest()
|
||||
echo i
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue