summary refs log tree commit diff stats
path: root/tests/async/t6846.nim
blob: 687a3f86543870107ec6d8c9446cf13cdaa5249f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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."