Skip to content
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

Implementation of close event of MessagePort API #51496

Closed
nononokam opened this issue Jan 17, 2024 · 4 comments
Closed

Implementation of close event of MessagePort API #51496

nononokam opened this issue Jan 17, 2024 · 4 comments
Labels
feature request Issues that request new features to be added to Node.js. stale

Comments

@nononokam
Copy link

nononokam commented Jan 17, 2024

There was no timely and reliable way to detect when a MessagePort becomes disentangled, which made it difficult to release resources associated with ports.
We proposed to add a close event to MessagePort API.
The close event has landed to the HTML spec. Chrome has already completed implementation and it’s close to ship.

Initial issue: whatwg/html#1766
Explainer: https://github.com/fergald/explainer-messageport-close
HTML spec: https://html.spec.whatwg.org/multipage/web-messaging.html#disentangle
Chrome status: https://chromestatus.com/feature/5086799659794432
Mozilla standards position: mozilla/standards-positions#914
WebKit standards position: WebKit/standards-positions#271
HTML spec PR: whatwg/html#9933

Primary contacts: @rakina, @mingyc, @nononokam

@marco-ippolito marco-ippolito added the feature request Issues that request new features to be added to Node.js. label Jan 17, 2024
@benjamingr
Copy link
Member

@nodejs/workers

Copy link
Contributor

There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the never-stale Mark issue so that it is never considered stale label or close this issue if it should be closed. If not, the issue will be automatically closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.

@github-actions github-actions bot added the stale label Jul 17, 2024
Copy link
Contributor

There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment.

For more information on how the project manages feature requests, please consult the feature request management document.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2024
@juanarbol
Copy link
Member

juanarbol commented Aug 16, 2024

Hey, sorry for the delay, I'm probably misreading this.

https://nodejs.org/docs/latest/api/worker_threads.html#event-close

MessagePort already emits the close event.

https://nodejs.org/docs/latest/api/worker_threads.html#portclose

The 'close' event is emitted on both MessagePort instances that are part of the channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. stale
Projects
None yet
Development

No branches or pull requests

4 participants