Files
Nim/tests/async/tpendingcheck.nim
2018-12-11 21:23:21 +01:00

19 lines
267 B
Nim

discard """
output: ""
"""
import asyncdispatch
doAssert(not hasPendingOperations())
proc test() {.async.} =
await sleepAsync(100)
var f = test()
while not f.finished:
doAssert(hasPendingOperations())
poll(10)
f.read
doAssert(not hasPendingOperations())