Re: [whatwg/fetch] Deferred fetching (PR #1647)

@fergald commented on this pull request.



> +<dl>
+ <dt><dfn export for="deferred fetch record">request</dfn>
+ <dd>A <a for=/>request</a>.
+
+ <dt><dfn export for="deferred fetch record">inactivity delay</dfn> (default null)
+ <dd>Null or a <a>duration</a>.
+
+ <dt><dfn export for="deferred fetch record">invoke state</dfn> (default "<code>deferred</code>")
+ <dd>
+  <p>"<code>deferred</code>", "<code>scheduled</code>", "<code>terminated</code>",
+  "<code>aborted</code>", or "<code>activated</code>".
+
+  <p class=note>This value can be modified <a>in parallel</a>. There could be a race condition where
+  the <code>Document</code> object's <a for=/>event loop</a> might change it to
+  "<code>deferred</code>" at the same time that it is changed to "<code>activated</code>". UAs can
+  mitigate this race condition in an <a>implementation-defined</a> manner.

> Actually I think we can make it tighter and getting rid of the raciness by making activated async:

I don't think it helps. We did a lot of discussion on this way back at the start.

The race is basically the same as the version without `await`. Nothing (in the spec) is stopping the internal state from changing between the `await` returning and the `abort()` call.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1647#discussion_r1314249823
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1647/review/1608517683@github.com>

Received on Sunday, 3 September 2023 12:51:57 UTC