diff options
author | Aaron Robinson <arobins@microsoft.com> | 2019-04-19 22:11:39 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2019-04-19 22:11:39 -0700 |
commit | 324344f82a6f8221d28f9015f64be06779632468 (patch) | |
tree | cd0448d28dd00d4be6991d87a35fddc50df227b1 | |
parent | 0f93182d5d8eeefe18ec50b1d4d32fd5d05333eb (diff) | |
download | coreclr-324344f82a6f8221d28f9015f64be06779632468.tar.gz coreclr-324344f82a6f8221d28f9015f64be06779632468.tar.bz2 coreclr-324344f82a6f8221d28f9015f64be06779632468.zip |
The thread triggering finalizer shutdown events should be in an alertable state. (#24133)
-rw-r--r-- | src/vm/finalizerthread.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vm/finalizerthread.h b/src/vm/finalizerthread.h index d5063b2166..3a62814d18 100644 --- a/src/vm/finalizerthread.h +++ b/src/vm/finalizerthread.h @@ -68,7 +68,11 @@ public: // Do not wait for FinalizerThread if the current one is FinalizerThread. if (GetThread() != GetFinalizerThread()) - hEventFinalizerToShutDown->Wait(INFINITE,FALSE); + { + // This wait must be alertable to handle cases where the current + // thread's context is needed (i.e. RCW cleanup) + hEventFinalizerToShutDown->Wait(INFINITE, /*alertable*/ TRUE); + } } static void FinalizerThreadWait(DWORD timeout = INFINITE); |