davidfowl / AspNetCoreDiagnosticScenarios

This repository has examples of broken patterns in ASP.NET Core applications
7.69k stars 740 forks source link

Add note about initializing a FileStream for async reading/writing #33

Open sveinungf opened 5 years ago

sveinungf commented 5 years ago

Hi, maybe this is worth mentioning. Basically, the FileOptions.Asynchronous flag should be passed when creating a FileStream (e.g. with File.Create), otherwise the actual I/O operations are performed synchronously. More info.

davidfowl commented 5 years ago

Good one! Even though FileStream is still a disaster when it comes to async IO

yahorsi commented 4 years ago

Same sockets?

davidfowl commented 3 years ago

Sockets are fine.