From e31a27bf2545fdd76e44d5ce80f6db73fcd0fef3 Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 15 Sep 2010 19:49:40 +0000 Subject: [PATCH] Follow up r71805: Drop PoolWork from the configuration key, and update DefaultSettings comment, document workers, maxqueue and timeout parameters. --- includes/Article.php | 3 +-- includes/DefaultSettings.php | 5 ++++- includes/PoolCounter.php | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 0999bdbd01..753e157beb 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -4455,7 +4455,6 @@ class Article { * * @param $parserOutput mixed ParserOptions object, or boolean false **/ - protected function doCascadeProtectionUpdates( $parserOutput ) { if ( !$this->isCurrent() || wfReadOnly() || !$this->mTitle->areRestrictionsCascading() ) { return; @@ -4623,7 +4622,7 @@ class PoolWorkArticleView extends PoolCounterWork { private $mArticle; function __construct( $article, $key, $useParserCache, $parserOptions ) { - parent::__construct( __CLASS__, $key ); + parent::__construct( 'ArticleView', $key ); $this->mArticle = $article; $this->cacheable = $useParserCache; $this->parserOptions = $parserOptions; diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 299d73cf26..02fda8a248 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5070,8 +5070,11 @@ $wgRedirectOnLogin = null; * The remaining elements are passed through to the class as constructor * parameters. Example: * - * $wgPoolCounterConf = array( 'Article::view' => array( + * $wgPoolCounterConf = array( 'ArticleView' => array( * 'class' => 'PoolCounter_Client', + * 'timeout' => 15, // wait timeout in seconds + * 'workers' => 5, // maximum number of active threads in each pool + * 'maxqueue' => 50, // maximum number of total threads in each pool * ... any extension-specific options... * ); */ diff --git a/includes/PoolCounter.php b/includes/PoolCounter.php index 825ae34ca1..8b6e18aea6 100644 --- a/includes/PoolCounter.php +++ b/includes/PoolCounter.php @@ -9,8 +9,10 @@ * of the cpu of the pool. This is also known as 'Michael Jackson effect'. * The PoolCounter provides semaphore semantics for restricting the number * of workers that may be concurrently performing such single task. + * + * By default PoolCounter_Stub is used, which provides no locking. You + * can get a useful one in the PoolCounter extension. */ - abstract class PoolCounter { /* Return codes */ -- 2.20.1