diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2018-08-23 15:31:28 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-08-23 16:31:28 +0200 |
commit | 7532b37405c9365f3f2935633111f309234297b2 (patch) | |
tree | 4ef493b483fac17dd3cd5ebe1f5284527621cb82 /tests | |
parent | 55a86497491586dc1b5ad2f6303d53992b999ab5 (diff) | |
download | Nim-7532b37405c9365f3f2935633111f309234297b2.tar.gz |
Don't skip poll() when no handles are present. (#8727)
Fixes #7886. Fixes #7758. Fixes #6929. Fixes #3909. Replaces #8209.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/async/t7758.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/async/t7758.nim b/tests/async/t7758.nim new file mode 100644 index 000000000..57d0f4004 --- /dev/null +++ b/tests/async/t7758.nim @@ -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 \ No newline at end of file |