Application defined "locks"


#1

A proposal dating back to 2009 suggests adding platform primitives for web apps to coordinate usage of resources across execution contexts (tabs/frames/workers). We’ve learned that many applications are now working around this gap by using polling against databases such as Indexed DB, or coordinating via Service Workers (and databases).

With a handful of others, I’ve been discussing a Web Locks API. We’ve been prototyping an experimental implementation in Chrome as well, and would like feedback from others. It may also make sense to move further discussion (and the repo) into the WICG.

Explainer: https://github.com/inexorabletash/web-locks

Any interest from others?


#2

I’ve requested a position from Mozilla. https://github.com/mozilla/standards-positions/issues/64


#3

FYI, this has migrated to WICG:

https://wicg.github.io/web-locks/