Skip to content

Commit

Permalink
src: call uv_library_shutdown before DisposePlatform
Browse files Browse the repository at this point in the history
When the process exits, there may be tasks in the thread pool
that need to access data in the platform, such as trace agent.
So make sure the thread pool exits first.
see #44458
  • Loading branch information
theanarkh committed Oct 28, 2022
1 parent 806ea92 commit 32a1961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/environment.cc
Expand Up @@ -773,8 +773,8 @@ void DefaultProcessExitHandlerInternal(Environment* env, ExitCode exit_code) {
env->set_can_call_into_js(false);
env->stop_sub_worker_contexts();
env->isolate()->DumpAndResetStats();
DisposePlatform();
uv_library_shutdown();
DisposePlatform();
Exit(exit_code);
}

Expand Down

0 comments on commit 32a1961

Please sign in to comment.