File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -736,17 +736,18 @@ public string ThreadName
736736 m_data . ThreadName =
737737 SystemInfo . CurrentThreadId . ToString ( System . Globalization . NumberFormatInfo . InvariantInfo ) ;
738738#else
739- // '.NET ThreadPool Worker' appears as a default thread pool name in .NET 6+.
739+ // '.NET ThreadPool Worker' appears as a default thread name in the .NET 6-7 thread pool.
740+ // '.NET TP Worker' is the default thread name in the .NET 8+ thread pool.
740741 // Prefer the numeric thread ID instead.
741742 string threadName = System . Threading . Thread . CurrentThread . Name ;
742- if ( ! string . IsNullOrEmpty ( threadName ) && threadName != ".NET ThreadPool Worker" )
743+ if ( ! string . IsNullOrEmpty ( threadName ) && threadName != ".NET TP Worker" && threadName != ".NET ThreadPool Worker")
743744 {
744745 m_data . ThreadName = threadName ;
745746 }
746747 else
747748 {
748749 // The thread name is not available or unsuitable. Therefore we
749- // go the the AppDomain to get the ID of the
750+ // go to the AppDomain to get the ID of the
750751 // current thread. (Why don't Threads know their own ID?)
751752 try
752753 {
You can’t perform that action at this time.
0 commit comments