- From: Adam Rice <notifications@github.com>
- Date: Thu, 08 Mar 2018 10:04:34 +0000 (UTC)
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 8 March 2018 10:05:08 UTC
I'm concerned that this change is user-visible, and that it will be problematic to implement in Chrome. Take this example: ```javascript async function ObserveTaskQueue() { let pipeToComplete = false; const rs = new ReadableStream({ async start(controller) { controller.close(); for (let i = 0; i < 1000; ++i) { if (pipeToComplete) { console.log('done'); return; } await Promise.resolve(); } console.log('fail'); } }); const ws = new WritableStream(); await rs.pipeTo(ws); pipeToComplete = true; } ``` With Chrome's current implementation, this function prints "done". I believe that Chrome's implementation is compliant with the standard in this respect. I think an implementation is also permitted to print "fail". However, if I understand correctly, no task from the DOM manipulation task source can run while microtasks are executing. If this change to the standard is made, all implementations must print "fail". -- 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/streams/pull/902#issuecomment-371440591
Received on Thursday, 8 March 2018 10:05:08 UTC