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

Investigate if the algorithm and the implementations need to be updated #229

Open
beaufortfrancois opened this issue Sep 2, 2024 · 1 comment · May be fixed by #233
Open

Investigate if the algorithm and the implementations need to be updated #229

beaufortfrancois opened this issue Sep 2, 2024 · 1 comment · May be fixed by #233

Comments

@beaufortfrancois
Copy link
Collaborator

As originally posted by @marcoscaceres in #227 (comment):

this algorithm is wrong then. Above it says it runs “in parallel”, and you can see from both implementations that it’s running on the main thread.
This needs be updated to return a promise rejected with X and the later run the steps in parallel.

We need to investigate if the algorithm and the implementations need to be updated.

@tidoust
Copy link
Member

tidoust commented Sep 2, 2024

We need to investigate if the algorithm and the implementations need to be updated.

I note that the two algorithms that the spec currently says run "in parallel" must be updated, regardless of whether implementations need to be. As written, they are incorrect: a Promise cannot be resolved/rejected directly within steps that run in parallel. If the steps do run in parallel, then a task must be queued. See guidance in Dealing with the event loop in HTML and in particular "you must not directly access main-thread artifacts from a background thread [...] Doing so would create data races observable to JavaScript code"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants