mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
committed by
Andreas Rumpf
parent
8aae5c9385
commit
07e1da8342
16
tests/async/t6846.nim
Normal file
16
tests/async/t6846.nim
Normal file
@@ -0,0 +1,16 @@
|
||||
discard """
|
||||
exitcode: 0
|
||||
output: "hello world"
|
||||
disabled: windows
|
||||
"""
|
||||
|
||||
import asyncdispatch
|
||||
import asyncfile
|
||||
import times
|
||||
|
||||
var asyncStdout = 1.AsyncFD.newAsyncFile()
|
||||
proc doStuff: Future[void] {.async.} =
|
||||
await asyncStdout.write "hello world\n"
|
||||
|
||||
let fut = doStuff()
|
||||
doAssert fut.finished, "Poll is needed unnecessarily. See #6846."
|
||||
Reference in New Issue
Block a user