code: function lockMultiple(keys, critical) {   // Critical is run only in a context in which the locks for all keys are closed for our use.
      async.map(keys, function (key, lcb) { // Acquire a lock on each key and accumulate the unlock functions.
          lock(key, function (unlock) { lcb(null, unlock); });
      }, function (e, pendingLocks) {       // It is now our turn. Every lock critical has been called, but we haven't unlocked anything yet.
          noop(e);                          // never set, by construction
          critical(function () { pendingLocks.forEach(function (unlock) { unlock(); }); });
      });
  }
docs: Lock a number of keys at once, freeing them when all critical(unlock) calls unlock. keys must not have duplciates!