-
Notifications
You must be signed in to change notification settings - Fork 17
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
Missing tasks in parallel steps in Handwriting Recognition API #35
Comments
Hey @dontcallmedom, I've made a draft and have some questions:
|
Not really, see w3ctag/design-principles#38 for a discussion on this. Basic guideline is to create a dedicated task source for related events, so as to leave freedom to implementations to order these tasks relative to other (unrelated) tasks.
Yes. Specs such as DOM or HTML now include steps in their algorithms to initialize the realm and call it out in the call to "queue a global task", for example, see Calling things out has the advantage of removing all possible ambiguities. It also makes it easier to spot potential issues automatically (e.g., tasks where the realm is actually unclear). Now, from a readability perspective, it's certainly tempting to write a more generic "hey, the realm in the algorithms defined in this spec is always the same and unambiguous, so we won't repeat it everywhere". A middle-ground approach that we're trying in the Presentation API is to define a wrapping queue a [custom] task algorithm that sets the parameters and calls "queue a global task" and that then gets used in the rest of the spec. The analysis tool will get lost for now because it does not yet follow algorithms, but hopefully it can become smart enough over time to understand this pattern. |
Thanks for the feedback, I've updated the draft :) |
Updates in parallel steps for getPrediction() to follow recommendataions in #35 Co-authored-by: François Daoust <fd@tidoust.net>
While crawling Handwriting Recognition API, the following algorithms fire an event, or resolve or reject a Promise, within a step that runs in parallel without first queuing a task:
See Dealing with the event loop in the HTML specification for guidance on how to deal with algorithm sections that run in parallel.
Cc @dontcallmedom @tidoust
This issue was detected and reported semi-automatically by Strudy based on data collected in webref.
The text was updated successfully, but these errors were encountered: