Re: [whatwg/fetch] ReadableStream and in-parallel/event-loop integration question (#976)

> How does it work in Blink(I've had a look but I'm not sure)?

We do it synchronously by entering the relevant script state when we want to call read().

> For Gecko, it looks like the reading workflow start immediately in the request constructor, and I though it might be similar in Blink(BodyStreamBuffer::OnStateChange also seems to be called in the constructor of BodyStreamBuffer).

I haven't traced it through fully, but I think you're right.

> So it could be interesting to see if such differences could be noticeable to script, perhaps if the fetch is terminated "early", like in the same task it is initiated. If the reading were to be done in a task-queued as part of "transmit the body" in fetch, it would only be queued if the fetch hadn't been terminated before.

I was also worried about what would happen if a higher-priority task blocked the queued task, but I'm not sure that's relevant.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/976#issuecomment-560955495

Received on Tuesday, 3 December 2019 01:25:09 UTC