summaryrefslogtreecommitdiff
path: root/src/vm/finalizerthread.cpp
diff options
context:
space:
mode:
authorKoundinya Veluri <kouvel@microsoft.com>2016-02-02 17:18:38 -0800
committerKoundinya Veluri <kouvel@microsoft.com>2016-02-02 18:35:32 -0800
commit7b87b346dba6ce21b81128d3b8e5c0ca2c8ab95f (patch)
treee91f2d2a73f5e0a6824e08eb2dc698ffa10bea2f /src/vm/finalizerthread.cpp
parente21ea0ad23f299e3f0a4b8584781fc9d6dab5315 (diff)
downloadcoreclr-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/finalizerthread.cpp')
-rw-r--r--src/vm/finalizerthread.cpp12
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.