Open timonkrebs opened 12 months ago
No Task should be stored in a variable to ensure structured sequential concurrency.
https://learn.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-disposeasync
Maybe there is a way to force await at the end of the scope which would probably be fine to.
Like: StructuredTaskScope
https://howtodoinjava.com/java/multi-threading/structured-concurrency/#3-implementing-structured-concurrency-with-structuredtaskscope
https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/index.md
https://github.com/DotNetAnalyzers/AsyncUsageAnalyzers/blob/master/AsyncUsageAnalyzers/AsyncUsageAnalyzers.Test/Usage/UseConfigureAwaitUnitTests.cs
https://github.com/DotNetAnalyzers/AsyncUsageAnalyzers/blob/master/AsyncUsageAnalyzers/AsyncUsageAnalyzers/Usage/UseConfigureAwaitAnalyzer.cs
https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD103.md
https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/tutorials/how-to-write-csharp-analyzer-code-fix
<WarningsAsErrors>CS4014</WarningsAsErrors> https://github.com/semihokur/AsyncFixer
<WarningsAsErrors>CS4014</WarningsAsErrors>
No Task should be stored in a variable to ensure structured sequential concurrency.
https://learn.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-disposeasync
Maybe there is a way to force await at the end of the scope which would probably be fine to.
Like: StructuredTaskScope
https://howtodoinjava.com/java/multi-threading/structured-concurrency/#3-implementing-structured-concurrency-with-structuredtaskscope