Closed itsWindows11 closed 1 week ago
For our purposes, we should fix this because when synchronous (default) is set, there's no cancellation support on the async methods of FileStream. I hadn't noticed that before, maybe I need to add CommonTests for this.
Additionally, there's a lot of sync and async-specific optimizations done to improve performance, so many that they're using the strategy pattern in the dotnet implementation of FileStream. We should definitely expose this flag on SystemFile, but this can be done in a different ticket.
By default, the stream returned from
File.Open
does synchronous operations on the file. We can make the underlying operating system give us an asynchronous file stream to do true async reads/writes.