MediaWiki  master
PoolCounterNull.php
Go to the documentation of this file.
1 <?php
22 
30 
31  public function __construct() {
32  // No parameters needed
33  }
34 
35  public function acquireForMe( $timeout = null ) {
36  return Status::newGood( PoolCounter::LOCKED );
37  }
38 
39  public function acquireForAnyone( $timeout = null ) {
40  return Status::newGood( PoolCounter::LOCKED );
41  }
42 
43  public function release() {
44  return Status::newGood( PoolCounter::RELEASED );
45  }
46 }
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Definition: Status.php:58
A default PoolCounter, which provides no locking.
release()
I have successfully finished my task.
acquireForMe( $timeout=null)
I want to do this task and I need to do it myself.
acquireForAnyone( $timeout=null)
I want to do this task, but if anyone else does it instead, it's also fine for me.
Semaphore semantics to restrict how many workers may concurrently perform a task.
Definition: PoolCounter.php:51
const LOCKED
Definition: PoolCounter.php:53
const RELEASED
Definition: PoolCounter.php:54
int $timeout
Maximum time in seconds to wait for the lock.
Definition: PoolCounter.php:77