Use Environment.CurrentManagedThreadId for efficiency

System.Environment.CurrentManagedThreadId is a compact and efficient replacement of the Thread.CurrentThread.ManagedThreadId pattern.
pull/5493/head
Qstick 1 year ago
parent f928ee7cad
commit af28bbad52

@ -194,7 +194,6 @@ dotnet_diagnostic.CA1819.severity = suggestion
dotnet_diagnostic.CA1822.severity = suggestion
dotnet_diagnostic.CA1823.severity = suggestion
dotnet_diagnostic.CA1824.severity = suggestion
dotnet_diagnostic.CA1840.severity = suggestion
dotnet_diagnostic.CA1845.severity = suggestion
dotnet_diagnostic.CA1846.severity = suggestion
dotnet_diagnostic.CA1847.severity = suggestion

@ -27,7 +27,7 @@ namespace NzbDrone.Test.Common
public int Start()
{
int threadId = Thread.CurrentThread.ManagedThreadId;
int threadId = Environment.CurrentManagedThreadId;
lock (_mutex)
{
_threads[threadId] = 1;

Loading…
Cancel
Save