discard """ file: "tasyncall.nim" exitcode: 0 """ import times, sequtils, unittest import asyncdispatch const taskCount = 10 sleepDuration = 50 proc futureWithValue(x: int): Future[int] {.async.} = await sleepAsync(sleepDuration) return x proc futureWithoutValue() {.async.} = await sleepAsync(sleepDuration) proc testFuturesWithValue(x: int): seq[int] = var tasks = newSeq[Future[int]](taskCount) for i in 0..