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