C
Join ServerC#
help
Stream.DisposeAsync() .NET Standard 2.0 [Answered]
NnathanAjacobs9/4/2022
Is there any way to dispose a stream asynchronously in .NET Standard 2.0?
Would using
Would using
await Task.Run(stream.Dispose);
work?Jjcotton429/4/2022
That's not really async
Jjcotton429/4/2022
You're just shunting the Dispose onto the thread pool
And waiting asynchronously for that to finish
And waiting asynchronously for that to finish
Jjcotton429/4/2022
Just use normal Dispose
MMKP9/4/2022
Dispose should be called normally when you using a using clause
AAccord9/6/2022
✅ This post has been marked as answered!