Re: [ServiceWorker] Race in Schedule Job algorithm handling of equivalent job promises (#853)

Ah.. right. Thanks for spotting this!

I think there are two options:
(A) as suggested
> I think maybe the easiest solution would be to set a flag when the Resolve Job Promise is run. Then we can simply avoid the coalescing optimization if that flag is set.

(B) For the equivalent incoming job, if the lastJob' promise has settled already, settle job's promise accordingly.

(A) seems simpler but then https://github.com/slightlyoff/ServiceWorker/issues/800#issuecomment-173831987 won't be a solution for .update() failing in oninstall any more (as the job will be queued). (B) doesn't involve the same issue but will have to additionally store the state of the promise settlement values for the lastJob. Which option would be better?


---
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/853#issuecomment-200713614

Received on Thursday, 24 March 2016 07:51:36 UTC