Nodejs 单进程异步锁使用 async-lock 2020-03-11 Nodejs, 笔记 Nodejs 单进程异步锁使用 async-lock123let asyncLock = require('async-lock');let lock = new asyncLock();global.AsyncLock = lock; 123await AsyncLock.acquire(playerId + command, async () => { await setXXX();});