Skip to content

Commit

Permalink
Skip EventPipe cleanup on mono unless runtime is shutting down (#99332)
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason authored Mar 6, 2024
1 parent 4c39348 commit 54e9ffe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mono/mono/eventpipe/ep-rt-mono.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,11 @@ ep_rt_mono_init_finish (void)
void
ep_rt_mono_fini (void)
{
// Avoid cleaning up resources to prevent cleaning up out from under running
// threads.
if (!mono_runtime_is_shutting_down ())
return;

ep_rt_mono_runtime_provider_fini ();
ep_rt_mono_profiler_provider_fini ();

Expand Down

0 comments on commit 54e9ffe

Please sign in to comment.