Re: [ServiceWorker] unregister() then register() same-scope, different script URL that fails: what do you expect to happen? (#396)

> On the other hand, since Activate is called from inside a set of atomic steps, instead of being called non-atomically and then having its own activation result queue, it means that no other workers get sent the activate event if a worker is currently handling the event. I was wondering if it could follow the installation pattern for consistency. I don't think it matters a lot :)

The invocation of Activate algorithm (Install step 9) is out of the atomic-step-block. And queuing a task in Activate step 1.11 is run in the same order as the invocation of the Activate algorithm itself as such. I'm not sure whether we have any case where more than two concurrently running Activate algorithms race for queuing a task.

I think the only improvement point here is we probably can divide the single atomic-step-block in Activate algorithm into two: 1.1 - 1.11 and the rest. It seems this will allow queuing a task to fire `activate` event  to be not block until the algorithm completes. But even in this case the queued tasked will run in the same order as in the current text.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/396#issuecomment-73839614

Received on Wednesday, 11 February 2015 06:36:27 UTC