andywer / threads.js

🧵 Make web workers & worker threads as simple as a function call.
https://threads.js.org/
MIT License
3.04k stars 161 forks source link

ability to disable the process hooks added by #150 #484

Open scottbessler opened 10 months ago

scottbessler commented 10 months ago

I have my own graceful shutdown functionality, so would need to disable this functionality so I can control when process.exit is called as I have more to do than clean up worker threads.

At the very least, it would be useful to be able to disable this functionality. I do think its bad for a library to add calls to process.exit in general, and would encourage you to remove it entirely.

panta82 commented 7 months ago

I "fixed" this locally via patch-package.