-
Notifications
You must be signed in to change notification settings - Fork 16
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
Held lock on worker and garbage collection #107
Comments
I'd agree that doesn't sound good. I don't have a good sense of what the implicit "strong references" are that causes this behavior, either in the abstract/spec space or in implementations. Which implies I don't know which references we'd need to explicitly weaken to prevent this. (BTW, are you sure that in implementations it's truly the lock itself? Just verifying, I haven't dug in or tried it. If the promise resolves on a timer, does the worker get GC'd after the timer fires?) |
Same, we'll have to investigate 😄 (Edit: I mean spec-wise. I investigated why it happens in Gecko)
For Gecko I can confirm it's the lock. I'm not sure about Chrome, I only checked that |
Given this code:
I found that this causes a held lock that is never released on both Firefox and Chrome, which means the worker itself is also kept alive because of that lock.
I'm not sure this is a preferable behavior, should a held lock prevent garbage collecting a worker?
The text was updated successfully, but these errors were encountered: