redis-semaphore
Version:
Distributed mutex and semaphore based on Redis
11 lines • 324 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getQuorum = getQuorum;
exports.smartSum = smartSum;
function getQuorum(clientCount) {
return Math.round((clientCount + 1) / 2);
}
function smartSum(count, zeroOrOne) {
return count + zeroOrOne;
}
//# sourceMappingURL=redlock.js.map
;