| repo | url | homepage | starredAt | createdAt | updatedAt | language | license | branch | stars | isPublic | isTemplate | isArchived | isFork | hasReadMe | refreshedAt | description | tags | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
metarhia/web-locks |
2025-02-01T06:24:32Z |
2020-03-06T19:42:45Z |
2025-02-17T09:30:41Z |
JavaScript |
MIT |
master |
88 |
true |
false |
false |
false |
true |
2025-02-25T19:51:08.889Z |
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.
- Simplest parallel programming primitive to solve a problem of data races and race conditions.
- Node.js and
worker_threadssupport. - Different optimized implementations for certain cases: single-threaded asynchronous locks, multi-threaded locks with a single unifyed API.
$ npm install web-locksawait locks.request('Resource name', async lock => {
// use named resource and release it after return
});This implementation of Web Locks API is MIT licensed.