Re: [whatwg/streams] Remove trivial non-zero delays in wpts (#605)

tyoshino approved this pull request.

lgtm

> @@ -286,7 +286,7 @@ promise_test(t => {
   const ws = recordingWritableStream({
     write() {
       if (ws.events.length > 2) {
-        return delay(10).then(() => {
+        return flushAsyncEvents().then(() => {

At a glance, some of the usage of the `flushAsyncEvents()` in this patch look not for flushing other async events, but for making the logic itself to be async to the rest. So, flushAsyncEvents() might not be the best phrase. Taking into account that async processing happens inside pipeTo(), it might be still a good name. Considering that we're making the logic to be async to the others and have it wait for the other "async" things to be done, it might be still a good name. So, it's just a matter of view point. I think it's not a good use of time for bikeshedding on this, so it's up to you. If you want, you can choose to have some more aliases to state the purpose of the method best for each place.

-- 
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/605#pullrequestreview-7780112

Received on Wednesday, 9 November 2016 10:31:53 UTC