@sschoener this is a trap in default StreamReader, FileStream etc. The ‘async’ part is that it’s not on the same thread, but that’s it. To make it actually async as you’d expect, you need to specify FileOptions.Asynchronous (https://learn.microsoft.com/en-us/dotnet/api/system.io.fileoptions?view=net-9.0) when creating the stream. That will turn the async operations into actual async overlapped IO.
=> More informations about this toot | View the thread | More toots from rovarma@mastodon.gamedev.place
=> View sschoener@mastodon.gamedev.place profile
text/gemini
This content has been proxied by September (3851b).