You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should there be an assertion that callers set either a client or useParallelQueue?
I believe this is the intent. Indeed, maybe useParallelQueue should not be an explicit argument, and setting client to null should automatically cause the parallel queue to be used?
Note that the fetch operation starts in the same thread from which it was called, and then breaks off to run its internal operations in parallel. The aforementioned callbacks are posted to a given event loop which is, by default, the client’s global object. To process responses in parallel and handle interactions with the main thread by yourself, fetch with useParallelQueue set to true.
https://fetch.spec.whatwg.org/#concept-fetch starts with:
So if client is null and useParallelQueue is false, taskDestination and so https://fetch.spec.whatwg.org/#fetch-params-task-destination stay null. But I don't see anything that blocks the later steps that call "Queue a fetch task ... with fetchParams’s task destination.", and Queue a fetch task assumes its task destination is non-null.
This also isn't mentioned in https://fetch.spec.whatwg.org/#fetch-elsewhere-request, which says "leave request’s client as null ... callbacks would be posted on a parallel queue" but doesn't tell callers to set useParallelQueue.
Should step 5 also set the taskDestination when client is null? Should there be an assertion that callers set either a client or useParallelQueue?
The text was updated successfully, but these errors were encountered: