t6846.nim 325 B

12345678910111213141516
  1. discard """
  2. exitcode: 0
  3. output: "hello world"
  4. disabled: windows
  5. """
  6. import asyncdispatch
  7. import asyncfile
  8. var asyncStdout = 1.AsyncFD.newAsyncFile()
  9. proc doStuff: Future[void] {.async.} =
  10. await asyncStdout.write "hello world\n"
  11. let fut = doStuff()
  12. doAssert fut.finished, "Poll is needed unnecessarily. See #6846."