{"library":"web-locks","type":"library","category":null,"description":"Node.js implementation of the Web Locks API that provides mutex and semaphore primitives for coordinating access to shared resources across worker threads. v0.0.9 (stable) uses worker_threads, Atomics, and SharedArrayBuffer for multi-threaded locking, with a fallback to single-threaded async locks. Supports a single unified API for both single-threaded and multi-threaded environments. Part of the Metarhia stack, targeting eventual inclusion in Node.js core. Minimal dependencies, MIT licensed.","language":"javascript","status":"active","version":"0.0.9","tags":["javascript","web locks","lock","locks","locking","web-locks","parallel","parallel programming","concurrency"],"last_verified":"Thu Jun 04","install":[{"cmd":"npm install web-locks","imports":["import { Lock } from 'web-locks'","import { locks } from 'web-locks'","await locks.request('name', async (lock) => { ... })"]},{"cmd":"yarn add web-locks","imports":[]},{"cmd":"pnpm add web-locks","imports":[]}],"homepage":"https://github.com/metarhia/web-locks#readme","github":"https://github.com/metarhia/web-locks","docs":null,"changelog":null,"pypi":null,"npm":"web-locks","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}