mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
Instead of doing the initializations of worker threads using small helper functions that are also used by the main thread initialization, wrap everything into a common prepareExecution() function with an isMainThread switch to turn off initializations that shouldn't be done for worker threads, so that we don't have to replicate all the initialization steps in the worker code, which can be error-prone. PR-URL: https://github.com/nodejs/node/pull/44869 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>