Closed linkdotnet closed 5 months ago
I used that construct cautiously to maximize performance, fully aware of the potential security risks. However, based on my initial, basic profiling tests, I did not notice any statistically significant performance difference. Given the potential benefits like reduced allocations, better diagnostics, and more control over threading, I think it's worth taking a deeper dive. I'll set aside some time for a more thorough analysis.
We can either use the safer method or just set the ConcurrencySettings.UseDeterministicTaskScheduler
to false to use the regular OTB TaskScheduler for the time being.
References: https://github.com/dotnet/runtime/issues/27483
Then let's park it and set the flag to false
- that let's us keep the original impl.
I will do this on another PR :D
We probably don't wanna use the unsafe version for no good reason.