lots of small changes

This commit is contained in:
Arne Döring
2018-12-05 19:03:01 +01:00
committed by Araq
parent c0c35839cc
commit a5ecbf823f
85 changed files with 180 additions and 110 deletions

View File

@@ -9,6 +9,6 @@ import asyncdispatch
proc testCallback() =
echo "testCallback()"
when isMainModule:
when true:
callSoon(testCallback)
poll()

View File

@@ -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 =

View File

@@ -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