- From: Noam Rosenthal <notifications@github.com>
- Date: Thu, 29 Jun 2023 01:29:25 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/1647/review/1504808614@github.com>
@noamr commented on this pull request. > + optimize batching of deferred fetches. + + <li><p>If the result of atomically exchanging the value of <var>deferredRecord</var>'s + <a for="deferred fetch record">invoke state</a> with "<code>sent</code>" is + "<code>scheduled</code>", then <a for=/>fetch</a> <var>record</var>'s + <a for="fetch record">request</a>. + </ol> + </li> +</ol> + +<p>When a <a for=fetch>fetch group</a> <var>fetchGroup</var> is +<dfn export for="fetch group" id=concept-fetch-group-reactivate>reactivated</dfn>: +<a for=list>For each</a> <a for=/>deferred fetch record</a> <var>deferredRecord</var> in +<var>fetchGroup</var>'s <a for="fetch group">deferred fetch records</a>: If the result of atomically +exchanging the value of <var>deferredRecord</var>'s <a for="deferred fetch record">invoke state</a> +with "<code>deferred</code>" is "<code>sent</code>", then <a for=list>remove</a> Doing it anywhere else would be racy. Apart from `invokeState`, the list of `deferred fetch records` should not be accessed in parallel, as in, should only be accessed from the main thread. If we did this in `deactivated`, there would be a short window where the fetch record is still in the list even though it's committed, which means it would, for example, affect the deferred fetch quota. Do you see any problem with doing this here? -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/pull/1647#discussion_r1246301546 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/fetch/pull/1647/review/1504808614@github.com>
Received on Thursday, 29 June 2023 08:29:31 UTC