code: function () {
              if (!pending.isEmpty()) { //!length
                  var cont = pending.dequeue(); //shift, but faster
                  setImmediate(function () { cont(unlock); });
              } else {
                  delete locks[key];
              }
          }
docs: []