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:
parent
1c3cfd74ff
commit
1b1633991a
2 changed files with 84 additions and 69 deletions
17
tests/async/t7758.nim
Normal file
17
tests/async/t7758.nim
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue