Open neoscie opened 4 months ago
Please ensure that a warning/error appears for this example case
In my opinion this should be avoided in 99.9% of the cases as it might lead to unwanted behavior. If someone want to actually spawn threads in a loop without waiting for them to finish/fail, then they should simply suppress the rule at that point.
It might be the VSTHRD100 rule but I didn't tested it.
It's a "code analyzer to detect common mistakes or potential issues regarding threading and async coding.".
it would introduce new rules: https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/index.md
Nuget: https://www.nuget.org/packages/microsoft.visualstudio.threading.analyzers