mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-21 11:02:01 +02:00
Use Environment.CurrentManagedThreadId for efficiency
System.Environment.CurrentManagedThreadId is a compact and efficient replacement of the Thread.CurrentThread.ManagedThreadId pattern.
This commit is contained in:
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…
x
Reference in New Issue
Block a user