qiyu-async-lock
v0.1.0
Published
Async Lock in Node Env
Downloads
5
Readme
QiYu AsyncLock
async lock in node env
npm install qiyu-async-lock
usage
const lock = new AsyncLock()
const locked = lock.tryLock() // for sync lock
const locked = await lock.lock(timeout) // for async lock with timeout
lock.unlock()