const AWAKE_ONE = 1; // wake-up if when a slot can be taken from an existing process
const AWAKE_ALL = 2; // wake-up if an existing process finishes and wake up such others
- /** @var array List of active PoolCounterRedis objects in this script */
+ /** @var PoolCounterRedis[] List of active PoolCounterRedis objects in this script */
protected static $active = null;
function __construct( $conf, $type, $key ) {
}
function acquireForMe() {
-
$status = $this->precheckAcquire();
if ( !$status->isGood() ) {
return $status;
}
function acquireForAnyone() {
-
$status = $this->precheckAcquire();
if ( !$status->isGood() ) {
return $status;
}
function release() {
-
if ( $this->slot === null ) {
return Status::newGood( PoolCounter::NOT_LOCKED ); // not locked
}
return 1
LUA;
try {
- $res = $conn->luaEval( $script,
+ $conn->luaEval( $script,
array(
$this->getSlotListKey(),
$this->getSlotRTimeSetKey(),