Now That’s What I Call Service Worker
alistapart.com
alistapart.com
Some say that Service Workers are "threadsafe" because they never share objects, they copy or transfer ownership.
You still have "concurrency" problems because the Service Worker is part of a distributed system where there is state on the client and in the service worker and in the workers that the service worker runs to subdivide the work, and on the back-end server, etc.
It is one thing to make it correct, it is another thing to make it really perform better than the status quo.