File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/libraries/System.Private.CoreLib/src/System/Threading Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,12 @@ private void RunWorker()
7878 // However, on OS X and NativeAOT (across all OSes), only the thread itself can set its name.
7979 // Therefore, by this point the native thread is still unnamed as it has not started yet.
8080 // See https://github.com/dotnet/runtime/issues/106464.
81- // Thread thread = Thread.CurrentThread;
82- // if (!string.IsNullOrEmpty(thread.Name))
83- // {
84- // // Name the underlying native thread to match the managed thread name.
85- // thread.ThreadNameChanged(thread.Name);
86- // }
81+ Thread thread = Thread . CurrentThread ;
82+ if ( ! string . IsNullOrEmpty ( thread . Name ) )
83+ {
84+ // Name the underlying native thread to match the managed thread name.
85+ thread . ThreadNameChanged ( thread . Name ) ;
86+ }
8787#endif
8888 if ( start is ThreadStart threadStart )
8989 {
You can’t perform that action at this time.
0 commit comments