diff options
author | Andrew Au <cshung@gmail.com> | 2018-12-13 22:29:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-13 22:29:46 -0800 |
commit | b093822a4dacfe6bd36970e270f0a6d720732a04 (patch) | |
tree | b8a738c0d3483730fd7c1a3c2ae22211eacfdf18 /src/vm/gcenv.ee.cpp | |
parent | 0f4051a19a1bd58562e5e95635bee7dac86ae24a (diff) | |
download | coreclr-b093822a4dacfe6bd36970e270f0a6d720732a04.tar.gz coreclr-b093822a4dacfe6bd36970e270f0a6d720732a04.tar.bz2 coreclr-b093822a4dacfe6bd36970e270f0a6d720732a04.zip |
Setting the m_willBlockOnGarbageCollectionEvent earlier and only when we will block to avoid the async break deadlock (#21319)
Setting the m_willBlockOnGarbageCollectionEvent earlier and only when we will block to avoid the async break deadlock
Diffstat (limited to 'src/vm/gcenv.ee.cpp')
-rw-r--r-- | src/vm/gcenv.ee.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vm/gcenv.ee.cpp b/src/vm/gcenv.ee.cpp index ff8f109f1b..98985422b0 100644 --- a/src/vm/gcenv.ee.cpp +++ b/src/vm/gcenv.ee.cpp @@ -20,16 +20,18 @@ void GCToEEInterface::SuspendEE(SUSPEND_REASON reason) _ASSERTE(reason == SUSPEND_FOR_GC || reason == SUSPEND_FOR_GC_PREP); + g_pDebugInterface->SuspendForGarbageCollectionStarted(); + ThreadSuspend::SuspendEE((ThreadSuspend::SUSPEND_REASON)reason); - g_pDebugInterface->BeforeGarbageCollection(); + g_pDebugInterface->SuspendForGarbageCollectionCompleted(); } void GCToEEInterface::RestartEE(bool bFinishedGC) { WRAPPER_NO_CONTRACT; - g_pDebugInterface->AfterGarbageCollection(); + g_pDebugInterface->ResumeForGarbageCollectionStarted(); ThreadSuspend::RestartEE(bFinishedGC, TRUE); } |