43 references to ManagedThreadId
Binding.Http.IntegrationTests (2)
OperationContextTests.cs (2)
48int currentThreadId = Thread.CurrentThread.ManagedThreadId; 50Assert.NotEqual(currentThreadId, Thread.CurrentThread.ManagedThreadId);
Binding.Tcp.IntegrationTests (8)
OperationContextAsyncFlowTests.cs (8)
35int currentThreadId = Thread.CurrentThread.ManagedThreadId; 37Assert.NotEqual(currentThreadId, Thread.CurrentThread.ManagedThreadId); 70int currentThreadId = Thread.CurrentThread.ManagedThreadId; 72Assert.NotEqual(currentThreadId, Thread.CurrentThread.ManagedThreadId); 78currentThreadId = Thread.CurrentThread.ManagedThreadId; 80Assert.NotEqual(currentThreadId, Thread.CurrentThread.ManagedThreadId); 161int currentThreadId = Thread.CurrentThread.ManagedThreadId; 163Assert.NotEqual(currentThreadId, Thread.CurrentThread.ManagedThreadId);
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHostBuilder.cs (1)
217WebAssemblyDispatcher._mainManagedThreadId = currentThread.ManagedThreadId;
Microsoft.Build (9)
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
1432file.WriteLine("{0}({1})-{2}: {3}", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, DateTime.UtcNow.Ticks, message);
BackEnd\Components\RequestBuilder\Lookup.cs (1)
1376_threadIdThatEnteredScope = Thread.CurrentThread.ManagedThreadId;
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
360_yieldThreadId = Thread.CurrentThread.ManagedThreadId; 389ErrorUtilities.VerifyThrow(_yieldThreadId == Thread.CurrentThread.ManagedThreadId, "Cannot call Reacquire() on thread {0} when Yield() was called on thread {1}", Thread.CurrentThread.ManagedThreadId, _yieldThreadId);
BackEnd\Components\Scheduler\Scheduler.cs (1)
2573file.Write("{0}({1})-{2}: ", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, _schedulingData.EventTime.Ticks);
CommunicationsUtilities.cs (1)
844file.WriteLine("{0} (TID {1}) {2,15} +{3,10}ms: {4}", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, now, millisecondsSinceLastLog, message);
NodeEndpointOutOfProcBase.cs (2)
296ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread.");
Microsoft.Build.Engine.UnitTests (8)
BackEnd\NodeEndpointInProc_Tests.cs (8)
305Assert.Equal(_host.DataReceivedContext.thread.ManagedThreadId, Thread.CurrentThread.ManagedThreadId); 311Assert.Equal(_host.DataReceivedContext.thread.ManagedThreadId, Thread.CurrentThread.ManagedThreadId); 338Assert.NotEqual(_host.DataReceivedContext.thread.ManagedThreadId, Thread.CurrentThread.ManagedThreadId); 348Assert.NotEqual(_host.DataReceivedContext.thread.ManagedThreadId, Thread.CurrentThread.ManagedThreadId);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Threading\StaTaskScheduler.cs (1)
25public bool IsRunningInScheduler => StaThread.ManagedThreadId == Environment.CurrentManagedThreadId;
Microsoft.Extensions.Telemetry.Tests (1)
Enrichment\ProcessLogEnricherTests.cs (1)
63Assert.Equal(Thread.CurrentThread.ManagedThreadId.ToString(CultureInfo.InvariantCulture), enrichedState[ProcessEnricherTagNames.ThreadId]);
Microsoft.Maui.Resizetizer (5)
AsyncTask.cs (5)
59 uiThreadId = Thread.CurrentThread.ManagedThreadId; 108 if (uiThreadId == Thread.CurrentThread.ManagedThreadId) 137 if (uiThreadId == Thread.CurrentThread.ManagedThreadId) 182 if (uiThreadId == Thread.CurrentThread.ManagedThreadId) 216 if (uiThreadId == Thread.CurrentThread.ManagedThreadId)
MSBuild (4)
CommunicationsUtilities.cs (1)
844file.WriteLine("{0} (TID {1}) {2,15} +{3,10}ms: {4}", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, now, millisecondsSinceLastLog, message);
NodeEndpointOutOfProcBase.cs (2)
296ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread.");
PerformanceLogEventListener.cs (1)
146s_builder.Append($"[{DateTime.UtcNow.ToString("o")}] Event={eventData.EventSource.Name}/{eventData.EventName} ProcessID={_processIDStr} ThreadID={System.Threading.Thread.CurrentThread.ManagedThreadId}\t ");
MSBuildTaskHost (3)
CommunicationsUtilities.cs (1)
844file.WriteLine("{0} (TID {1}) {2,15} +{3,10}ms: {4}", Thread.CurrentThread.Name, Thread.CurrentThread.ManagedThreadId, now, millisecondsSinceLastLog, message);
NodeEndpointOutOfProcBase.cs (2)
296ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread.");
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
553public override int GetHashCode() => ManagedThreadId;