Why do you not tell us that fmRead mode works fine?
import asyncdispatch, asyncfile
proc readFiles() {.async.} =
var file = openAsync("test.txt", fmRead)
#file.setFilePos(0)
let data = await file.readAll()
echo(data)
#await file.write("Hello!\n")
file.close()
waitFor readFiles()
RunSo it may be not an async problem, but only related to fmReadWrite mode. ReadWrite file access can have unexpected results, I know that from some other languages. Maybe you can investigate it yourself further.
