Toot

Written by Ritesh Oedayrajsingh Varma on 2025-01-20 at 14:51

@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

Mentions

=> View sschoener@mastodon.gamedev.place profile

Tags

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113861242927338754
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
230.219104 milliseconds
Gemini-to-HTML Time
0.737017 milliseconds

This content has been proxied by September (3851b).