diff options
author | Koundinya Veluri <kouvel@microsoft.com> | 2016-02-02 17:18:38 -0800 |
---|---|---|
committer | Koundinya Veluri <kouvel@microsoft.com> | 2016-02-02 18:35:32 -0800 |
commit | 7b87b346dba6ce21b81128d3b8e5c0ca2c8ab95f (patch) | |
tree | e91f2d2a73f5e0a6824e08eb2dc698ffa10bea2f /src/vm | |
parent | e21ea0ad23f299e3f0a4b8584781fc9d6dab5315 (diff) | |
download | coreclr-7b87b346dba6ce21b81128d3b8e5c0ca2c8ab95f.tar.gz coreclr-7b87b346dba6ce21b81128d3b8e5c0ca2c8ab95f.tar.bz2 coreclr-7b87b346dba6ce21b81128d3b8e5c0ca2c8ab95f.zip |
Expose COMPlus_FinalizeOnShutdown in retail builds
To enable a workaround to restore the previous behavior before finalizers stopped running on shutdown by default
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/finalizerthread.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/vm/finalizerthread.cpp b/src/vm/finalizerthread.cpp index 582e789b41..80ce9ca4c6 100644 --- a/src/vm/finalizerthread.cpp +++ b/src/vm/finalizerthread.cpp @@ -863,11 +863,7 @@ DWORD __stdcall FinalizerThread::FinalizerThreadStart(void *args) _ASSERTE(g_fEEShutDown); _ASSERTE(GetFinalizerThread()->PreemptiveGCDisabled()); - bool finalizeOnShutdown = DEFAULT_FinalizeOnShutdown != 0; -#ifdef _DEBUG - finalizeOnShutdown = CLRConfig::GetConfigValue(CLRConfig::INTERNAL_FinalizeOnShutdown) != 0; -#endif - if (finalizeOnShutdown) + if (CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_FinalizeOnShutdown) != 0) { // Finalize all registered objects during shutdown, even they are still reachable. GCHeap::GetGCHeap()->SetFinalizeQueueForShutdown(FALSE); @@ -1214,11 +1210,7 @@ BOOL FinalizerThread::FinalizerThreadWatchDog() _ASSERTE((g_fEEShutDown & ShutDown_Finalize1) || g_fFastExitProcess); - bool finalizeOnShutdown = DEFAULT_FinalizeOnShutdown != 0; -#ifdef _DEBUG - finalizeOnShutdown = CLRConfig::GetConfigValue(CLRConfig::INTERNAL_FinalizeOnShutdown) != 0; -#endif - if (finalizeOnShutdown) + if (CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_FinalizeOnShutdown) != 0) { // When running finalizers on shutdown (including for reachable objects), suspend threads for shutdown before // running finalizers, so that the reachable objects will not be used after they are finalized. |