lots of small changes
This commit is contained in:
parent
c0c35839cc
commit
a5ecbf823f
85 changed files with 180 additions and 110 deletions
|
|
@ -9,6 +9,6 @@ import asyncdispatch
|
|||
proc testCallback() =
|
||||
echo "testCallback()"
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
callSoon(testCallback)
|
||||
poll()
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ proc serve() {.async.} =
|
|||
var fut = await accept()
|
||||
await processClient(fut)
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
proc main =
|
||||
var fut = serve()
|
||||
fut.callback =
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ proc asyncRecursionTest*(): Future[int] {.async.} =
|
|||
inc(result, await asyncRecursionCycle(i))
|
||||
inc(i)
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
setGlobalDispatcher(newDispatcher())
|
||||
var i = waitFor asyncRecursionTest()
|
||||
echo i
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue