web-locks
web-locks copied to clipboard
Implement locking timeout
await locks.request('A', { timeout: 5000 }, async () => {
// resource will be released if this function will not end before timeout
});
await locks.request('A', { timeout: 5000 }, async () => {
// resource will be released if this function will not end before timeout
});