docs: function tick(key) {
      var next;
      if (waiting[key]) {
          //there's somone waiting for this resource
          if (!locks[key]) {
              locks[key] = true;
              stats.lock_add();
              next = waiting[key].shift();
              if (waiting[key].length === 0) {
                  //nobody is waiting for this resource anymore, clean it up
                  delete waiting[key];
              }
              next(key);
          }
      }
  }