Logo - Diego Naive, Noun Project.
npm install @lauf/lock --save
To get a lock on a particular key, call
lock.acquire(key). The Promise returned will block until every prior requester for that key has already
released their lock, meaning it's your turn. The promise will then resolve to your very own
Release function, indicating you have the lock. Finally, call the
Release function to notify you have given up the lock.
Browse the API.
A Release function issued to a caller when they acquire a Lock on a particular key. The caller is expected to invoke this function to give up the lock and allow other processes to enter the mutual exclusion for that key.
Create a Lock to assert mutual exclusion for
values of type
Generated using TypeDoc