-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
worker_threads: worker handles not cleaned up in async_hooks API #26535
Comments
Destroy the `Worker` class earlier, because we don’t need access to it once the thread has stopped and all resources have been cleaned up. Fixes: nodejs#26535
I don’t think it’s quite a bug, because it’s only happening because the However, this is still fixable in the sense that we can destroy the objects earlier, if we want: #26542 |
Ahh, I see. No worries then. I was just concerned the handles were not being cleaned up or something. |
Destroy the `Worker` class earlier, because we don’t need access to it once the thread has stopped and all resources have been cleaned up. PR-URL: #26542 Fixes: #26535 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Destroy the `Worker` class earlier, because we don’t need access to it once the thread has stopped and all resources have been cleaned up. PR-URL: #26542 Fixes: #26535 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Not sure if it's a bug or not, but I've noticed that
destroy
is never executed for the asyncIds pertaining to workers.Output:
The text was updated successfully, but these errors were encountered: