-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Reason
Net 9 + introduce Lock type that more efficient than plain object type. Consider using Lock since we already target Net 9 and Net 10.
Reference lock statement
Implementation
In Line 18 we have
private static readonly object _lock = new();We can introduce #if directive to using new Lock type, like this
#if NET9_0_OR_GREATER
private static readonly Lock _lock = new();
#else
private static readonly object _lock = new();
#endifthe rest can stay as is as compiler will recognize this type and automatically lower correctly for us
Hyrius and TopSwagCode
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed