Remove unnecessary cleanup on diagnostics server thread during shutdown (dotnet/corec...
authorSung Yoon Whang <suwhang@microsoft.com>
Fri, 11 Oct 2019 03:39:14 +0000 (20:39 -0700)
committerJan Kotas <jkotas@microsoft.com>
Fri, 11 Oct 2019 03:39:14 +0000 (20:39 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/3ec59a02624bf4b52f5ffe82d1ecde84c20402bc

src/coreclr/src/vm/diagnosticserver.cpp

index dcad53c..bc48991 100644 (file)
@@ -206,27 +206,6 @@ bool DiagnosticServer::Shutdown()
                     szMessage);                                           // data2
             };
             s_pIpc->Close(ErrorCallback); // This will break the accept waiting for client connection.
-
-            if (s_hServerThread != NULL)
-            {
-#ifndef FEATURE_PAL
-                ::CancelSynchronousIo(s_hServerThread);
-#endif // FEATURE_PAL
-
-                // At this point, IO operations on the server thread through the
-                // IPC channel has been closed/cancelled.
-
-                // On non-Windows, this function is blocking on threads that already exit.
-                // ::WaitForSingleObject(s_hServerThread, INFINITE);
-
-                // Close the thread handle (dispose OS resource).
-                ::CloseHandle(s_hServerThread);
-                s_hServerThread = INVALID_HANDLE_VALUE;
-            }
-
-            // If we do not wait for thread to teardown, then we cannot delete this object.
-            // delete s_pIpc;
-            // s_pIpc = nullptr;
         }
         fSuccess = true;
     }