Web Locks API 🔒
Web Locks API
implementation for Node.js based on
worker_threads
,
Atomics
,
SharedArrayBuffer
,
asynchronous functions,
and queue.
See specification: wicg.github.io/web-locks/ and documentation: developer.mozilla.org/en-US/docs/Web/API/Lock
This implementation is a part of Metarhia technology stack, needed for the first pilot project of Node.js application server based on parallel programming and workload micro-isolation. Web Locks API is intended to be merged into Node.js in future.
worker_threads
support.$ npm install web-locks
await locks.request('Resource name', async lock => {
// use named resource and release it after return
});
This implementation of Web Locks API is MIT licensed.