Re: [w3c/ServiceWorker] setTimeout/setInterval are unreliable in ServiceWorkers (#838)

@jakearchibald 

It's not mandatory to stay alive for a service worker for 30 minutes.

Let's say service worker boots up first time... `setinterval` code in the global scope gets called.  

Now, we have 2 scenarios.

1) service worker stays alive for 30 minutes. which means my callback gets called.
2) service worker gets killed and it boots up again which executes my `setInterval` code again. 

So what's the risk or downside of this? i don't think there's one.

If I have the code in the global scope without `setInterval` , who knows, maybe it doesn't get killed for the next 30 minutes which means I lose the callback ...  

Makes sense ?

-- 
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/838#issuecomment-625165459

Received on Thursday, 7 May 2020 10:20:40 UTC