-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.staleworkerIssues and PRs related to Worker support.Issues and PRs related to Worker support.
Description
Chrome 70 ships with Web Locks:
The Web Locks API allows scripts running in one tab or worker to asynchronously acquire a lock, hold it while work is performed, then release it. While held, no other script executing in the same origin can acquire the same lock, which allows a web app running in multiple tabs or workers to coordinate work and the use of resources.
navigator.locks.request('my_resource', async lock => {
// The lock has been acquired.
await do_something();
await do_something_else();
// Now the lock will be released.
});Would it make sense for Node to ship such an API for workers (or even child processes)?
cc @nodejs/workers @nodejs/open-standards
addaleax, sagirk, chicoxyzzy, amitbend, mintzo and 20 more
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.staleworkerIssues and PRs related to Worker support.Issues and PRs related to Worker support.