Is it safe to call File.WriteAllTextAsync to write to a single file multiple times without awaiting the result, as long as all the calls are made in a single thread?
By safe I mean:
- no IO exception will be thrown
- afterwards the file will have the content of the last call made
This seems to run fine, but is it guaranteed to do so?
for (var i = 0; i < 1000; ++i)
{
File.WriteAllTextAsync(fileName, i.ToString());
}