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

Queue a global event loop task from parallel queue algorithms when running script #108

Open
shaseley opened this issue Feb 24, 2022 · 1 comment

Comments

@shaseley
Copy link

Hi all, friendly drive-by question/issue about how this spec is queuing tasks on the event loop: should the algorithms in this spec running out of the lock task queue (which is a parallel queue) explicitly queue a global task when running script? My understanding from [1] is that they should be.

I see some cases where script is being run directly out of a parallel queue, e.g. rejecting promises in step 3.4 of the request algorithm, and some cases where the parallel enqueue algorithm is being used on the event loop, e.g. step 5.1 of the request algorithm --- which I don't think makes sense since that algorithm takes a parallel queue as an argument.

I also see that there's a statement that the "the task source for steps enqueued below is the web locks tasks source," but it's not clear how that applies, i.e. steps themselves run out of a parallel queue which has no task source. IIUC this task source should be used in the context of queueing a global task, which should be added to the parallel queue algorithms where necessary.

Thoughts?

[1] From the event loop spec on discussing parallel algorithms, "To affect the world of observable JavaScript objects, then, you must queue a global task to perform any such manipulations."

@saschanaz
Copy link
Member

Yeah, I think that's what Gecko already does indeed. The lock task queue exists in a separate process and it pings the content process to do the things, like settling a promise.

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

No branches or pull requests

2 participants