mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
22 lines
310 B
Nim
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())
|
|
|