Don't skip poll() when no handles are present. (#8727)

Fixes #7886.

Fixes #7758.

Fixes #6929.

Fixes #3909.

Replaces #8209.
This commit is contained in:
Dominik Picheta 2018-08-23 15:31:28 +01:00 • committed by Andreas Rumpf
commit 1b1633991a
2 changed files with 84 additions and 69 deletions

17
tests/async/t7758.nim Normal file
View file

@ -0,0 +1,17 @@
discard """
file: "t7758.nim"
exitcode: 0
"""
import asyncdispatch
proc task() {.async.} =
await sleepAsync(1000)
when isMainModule:
var counter = 0
var f = task()
while not f.finished:
inc(counter)
poll()
doAssert counter == 2