summary refs log tree commit diff stats
path: root/tests/async/tpendingcheck.nim
blob: a5537d8cb8eba7cbae6b9fcdb93e5183d0c3a086 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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())