Serious question, when would you want to use synchronization primitives in the frontend? I've seen the discussion revolve around service worker / web worker usage, but I think sharing ressources between a worker and the main thread has been discussed in the past and has ultimately been abandoned for security reasons.