src: ready background workers before bootstrap
This is an alternative to #23110 that doesn't depend upon https://github.com/libuv/libuv/pull/2003.
Make sure background workers are ready before proceeding with the
bootstrap or post-bootstrap execution of any code that may trigger
process.exit()
.
Fixes: https://github.com/nodejs/node/issues/23065
EDIT: CI: https://ci.nodejs.org/job/node-test-pull-request/17595/
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines