#7840443745596 implement lock with when.js