Re: [w3c/IndexedDB] Add missing parallel step and define queue a database task (PR #456)

@inexorabletash requested changes on this pull request.



> @@ -1927,6 +1927,12 @@ through the properties of the {{IDBRequest}} instance.
 
 The <span>task source</span> for these tasks is the <dfn id=database-access-task-source export>database access task source</dfn>.
 
+<div algorithm>
+
+To <dfn export>queue a database task</dfn>, perform [=queue a task=] on the [=database access task source=]

Nit: needs trailing period at the end of the sentence.

Why export the definition? Are you aware of other specs that should be referencing it?

> @@ -2330,22 +2336,24 @@ The <dfn method for=IDBFactory>databases()</dfn> method steps are:
 
 1. Run these steps [=in parallel=]:
 
-    1. Let |databases| be the [=/set=] of [=/databases=] in |storageKey|.
-        If this cannot be determined for any reason, then [=/reject=] |p| with
-        an appropriate error (e.g. an "{{UnknownError}}" {{DOMException}})
-        and terminate these steps.
+    1. [=Queue a database task=] to run these steps:

I think it would be more consistent with the rest of the spec to not make all of the substeps queued on the database task source. The spec generally uses "in parallel" to mean _"post this over to some implementation-defined thread or process that's interacting directly with the database"_ and "queue a task" to mean _"post this over to the JS thread"_. So only the terminal steps of the algorithm (rejecting, resolving) should get queued.

So change the prior text to read _"If this cannot be determined for any reason, then queue a database to reject p with..."_ and don't update the indentation of the substeps. And then...


>  
-    1. [=/Resolve=] |p| with |result|.
+        1. [=/Resolve=] |p| with |result|.

... Change this to _"Queue a task to resolve p with result."_



-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/pull/456#pullrequestreview-2841572037
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/IndexedDB/pull/456/review/2841572037@github.com>

Received on Wednesday, 14 May 2025 21:47:14 UTC