getsentry / sentry-dotnet

Sentry SDK for .NET
https://docs.sentry.io/platforms/dotnet
MIT License
599 stars 206 forks source link

Leverage new Lock types #3689

Open jamescrosswell opened 1 month ago

jamescrosswell commented 1 month ago

C# 13 includes a new Lock type intended to be used with the lock keyword.

Using Lock types as lock objects, the compiler can perform some optimisations that aren't possible when using standard object lock objects. It's a small thing, but we should probably replace the lock objects in our SDK to enable these optimisations.