Yes, it is possible:
import asyncdispatch
proc A() {.async.} =
for _ in 1..10:
echo("A")
await sleepAsync(0)
proc B() {.async.} =
for _ in 1..10:
echo("B")
await sleepAsync(0)
asyncCheck A()
waitFor B()
Run
- Is it possible to mimic Go's Goroutines Serge
- Is it possible to mimic Go's Goroutines cblake
- Is it possible to mimic Go's Goroutines dom96
