Files
Nim/tests/async/tpendingcheck.nim
2016-12-29 17:27:03 +07:00

22 lines
310 B
Nim

discard """
file: "tpendingcheck.nim"
exitcode: 0
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())