- From: Jake Archibald <notifications@github.com>
- Date: Mon, 17 Jun 2019 02:16:30 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 17 June 2019 09:16:52 UTC
@Jamesernator > I think there's a false association that async implies slow. Nah, the assumption is that in-series is slower than in-parallel. ```js const asyncResult = await doAsyncThing(); addEventListener('fetch', (event) => { if (asyncResultNeeded) { // … } }); ``` Vs: ```js const asyncResultP = doAsyncThing(); addEventListener('fetch', async (event) => { if (asyncResultNeeded) { const asyncResult = await asyncResultP; // … } }); ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/issues/1407#issuecomment-502603065
Received on Monday, 17 June 2019 09:16:52 UTC