Skip to content

Commit

Permalink
Add initial logic to study in parallel algorithm steps (#645)
Browse files Browse the repository at this point in the history
This initial logic reports algorithms that run steps in parallel, and that
resolve/reject promises (or fire an event) within these steps without first
queuing a task.

The analysis logic remains very basic but manages to extract all problems that
had been manually identified (with two exceptions detailed below):
  tidoust/parallel-promise#1

It also reports additional problems that had been missed in HTML, WebXR,
Element Capture, Managed Configuration API, Viewport Capture and WebHID.

The two exceptions are that are not yet detected automatically are:
- indirect problems: when an algorithm step that runs in parallel calls another
algorithm that contains steps that cannot run in parallel. This happens in
Manifest Incubations:
https://wicg.github.io/manifest-incubations/#dfn-steps-to-notify-that-an-install-prompt-is-available
- use of "parallel queue" instead of "in parallel", in Web Locks API and
Web Periodic Background Synchronization:
https://w3c.github.io/web-locks/#ref-for-lock-task-queue
https://wicg.github.io/periodic-background-sync/#process-periodic-sync-registrations-algorithm

A couple of cases need to be hardcoded to account for uses of "in parallel" and
"resolve" to mean something else in the Clipboard APIs, Push API and
Prerendering Revamped specs.
  • Loading branch information
tidoust authored Jul 25, 2024
1 parent 794eea2 commit dcb72e5
Show file tree
Hide file tree
Showing 4 changed files with 916 additions and 0 deletions.
Loading

0 comments on commit dcb72e5

Please sign in to comment.