You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Currently the
waitUntil()
logic says:The
waiting for all
text links toPromise.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 onewaitUntil()
can cut off the behavior blocking anotherwaitUntil()
. Or it may not cut them off. Its basically a race between that secondwaitUntil()
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.
The text was updated successfully, but these errors were encountered: