src: shutdown libuv before exit() · nodejs/node@f21d78d · GitHub
Skip to content

Commit f21d78d

Browse files
addaleaxrichardlau
authored andcommitted
src: shutdown libuv before exit()
This ensures that no operations will be running on the libuv threadpool, which is important because they may run into race conditions with the global destructors being triggered from `exit()`, such as in the added test example here. PR-URL: #35021 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 28e89f6 commit f21d78d

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

src/api/environment.cc

Lines changed: 1 addition & 0 deletions
Lines changed: 28 additions & 0 deletions

0 commit comments

Comments
 (0)