summary refs log tree commit diff stats
path: root/tests/async/tpendingcheck.nim
blob: 4eceb03532a4cbf66768b103ca6382cf1c1a07bc (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(50)

var f = test()
while not f.finished:
  doAssert(hasPendingOperations())
  poll(10)
f.read

doAssert(not hasPendingOperations())