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.CA1822.severity = suggestion
|
||||||
dotnet_diagnostic.CA1823.severity = suggestion
|
dotnet_diagnostic.CA1823.severity = suggestion
|
||||||
dotnet_diagnostic.CA1824.severity = suggestion
|
dotnet_diagnostic.CA1824.severity = suggestion
|
||||||
dotnet_diagnostic.CA1840.severity = suggestion
|
|
||||||
dotnet_diagnostic.CA1845.severity = suggestion
|
dotnet_diagnostic.CA1845.severity = suggestion
|
||||||
dotnet_diagnostic.CA1846.severity = suggestion
|
dotnet_diagnostic.CA1846.severity = suggestion
|
||||||
dotnet_diagnostic.CA1847.severity = suggestion
|
dotnet_diagnostic.CA1847.severity = suggestion
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace NzbDrone.Test.Common
|
||||||
|
|
||||||
public int Start()
|
public int Start()
|
||||||
{
|
{
|
||||||
int threadId = Thread.CurrentThread.ManagedThreadId;
|
int threadId = Environment.CurrentManagedThreadId;
|
||||||
lock (_mutex)
|
lock (_mutex)
|
||||||
{
|
{
|
||||||
_threads[threadId] = 1;
|
_threads[threadId] = 1;
|
||||||
|
|
Loading…
Reference in New Issue