- From: Ben Kelly <notifications@github.com>
- Date: Wed, 27 Jul 2016 16:50:36 -0700
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Wednesday, 27 July 2016 23:51:06 UTC
Currently the `waitUntil()` logic says: > Wait until the result of waiting for all of extendLifetimePromises settles. The `waiting for all` text links to `Promise.all()`: https://www.w3.org/2001/tag/doc/promises-guide#waiting-for-all In turn, `Promise.all()` fast fails if a single promise in the array rejects. This means that for things like `FetchEvent.waitUntil()` where rejection has no direct impact on SW life cycle or behavior, a rejection in one `waitUntil()` can cut off the behavior blocking another `waitUntil()`. Or it may not cut them off. Its basically a race between that second `waitUntil()` and the SW idle grace timer killing the worker. Maybe this is ok, but I'm not sure its what people expect when they look at the API. Perhaps we should consider using an algorithm that waits for all promises to settle (one way or another) and then if any rejected passed the first error message it saw. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/936
Received on Wednesday, 27 July 2016 23:51:06 UTC