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

FinalizationRegistry: missing example and lack of clarity on "threads" #26486

Closed
audetto opened this issue Apr 28, 2023 · 0 comments · Fixed by #26991
Closed

FinalizationRegistry: missing example and lack of clarity on "threads" #26486

audetto opened this issue Apr 28, 2023 · 0 comments · Fixed by #26991
Labels
Content:JS JavaScript docs

Comments

@audetto
Copy link

audetto commented Apr 28, 2023

MDN URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry

What specific section or headline is this issue about?

Notes on cleanup callbacks

What information was incorrect, unhelpful, or incomplete?

The documentation does not say anything about the thread that will run the callbacks.

It is very important because until the main thread "yields", they cannot run. And if the main thread never yields, they can only run at the end.
This has been confirmed both in node and deno.

Basically, without repeated calls to setTimeout, the callbacks never run.

I think it is a fundamental piece of information, even considering all the disclaimers.

What did you expect to see?

  1. information about the need of some sort of pause in the main thread
  2. a complete example

Do you have any supporting links, references, or citations?

https://github.com/orgs/nodejs/discussions/47716

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@audetto audetto added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Apr 28, 2023
@github-actions github-actions bot added the Content:JS JavaScript docs label Apr 28, 2023
@audetto audetto changed the title FinalizationRegistry: missing example and lack of clarity FinalizationRegistry: missing example and lack of clarity on "threads" Apr 28, 2023
@Josh-Cena Josh-Cena removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants