-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Define GC for workers in more detail #2553
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
Comments
I'd say open BroadcastChannel should keep worker alive. If I read the code right, that is happening in Gecko currently, there is a "WorkerHolder" in BroadcastChannel. |
Some of this is explicitly part of the standard, such as MessagePort. We should probably formalize all this a bit better or just claim they cannot be GC'd and stay alive for the duration of their owner(s). |
@SmauG you are right. BroadcastChannel, in gecko, keeps workers alive as well as MessagePort. |
@annevk, in case that BroadcastChannel behavior is not covered by the spec, we should file an issue. |
Currently a worker tracks MessagePort objects. It should probably track BroadcastChannel objects too, otherwise you can observe GC to some approximation.
cc @smaug---- @wanderview
The text was updated successfully, but these errors were encountered: