Stream.DisposeAsync() .NET Standard 2.0 [Answered]

Is there any way to dispose a stream asynchronously in .NET Standard 2.0? Would using await Task.Run(stream.Dispose); work?
3 Replies
jcotton42
jcotton423y ago
That's not really async You're just shunting the Dispose onto the thread pool And waiting asynchronously for that to finish Just use normal Dispose
Mkp
Mkp3y ago
Dispose should be called normally when you using a using clause
Accord
Accord3y ago
✅ This post has been marked as answered!
Want results from more Discord servers?
Add your server