45 $this->poolCounter = $poolCounter ??
82 public function error( $status ) {
92 return $this->poolCounter->isFastStaleEnabled();
102 $key = $this->poolCounter->getKey();
104 $this->poolCounter->getLogger()->info(
105 "Pool key '$key' ({$this->type}): " .
106 $status->getMessage()->inLanguage(
'en' )->useDatabase(
false )->text()
137 public function execute( $skipcache =
false ) {
138 if ( !$this->cacheable || $skipcache ) {
139 $status = $this->poolCounter->acquireForMe();
143 $status = $this->poolCounter->acquireForAnyone( 0 );
146 $staleResult = $this->
fallback(
true );
147 if ( $staleResult !==
false ) {
151 $status = $this->poolCounter->acquireForAnyone();
154 $status = $this->poolCounter->acquireForAnyone();
158 if ( !$status->isOK() ) {
164 switch ( $status->value ) {
173 $this->poolCounter->release();
178 if ( $result ===
false ) {
190 if ( $result !==
false ) {
203 $status = Status::newFatal( $errors[$status->value] ??
'pool-errorunknown' );
205 return $this->
error( $status );
211class_alias( PoolCounterWork::class,
'PoolCounterWork' );