Closed as not planned
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