From 2afba07f1158ac83fcd42928e0574ef742ce398d Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Thu, 6 Mar 2014 16:34:50 +0000 Subject: [PATCH] documentation for constructor of pools git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332927 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pthreads/pool/__construct.xml | 133 ++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 reference/pthreads/pool/__construct.xml diff --git a/reference/pthreads/pool/__construct.xml b/reference/pthreads/pool/__construct.xml new file mode 100644 index 0000000000..266d81ca01 --- /dev/null +++ b/reference/pthreads/pool/__construct.xml @@ -0,0 +1,133 @@ + + + + + + Pool::__construct + Creates a new Pool of Workers + + + + &reftitle.description; + + public PoolPool::__construct + integersize + stringclass + arrayctor + + + Construct a new Pool of Workers + + + + + &reftitle.parameters; + + + size + + + The maximum number of Workers this Pool can create + + + + + class + + + The class for new Workers + + + + + ctor + + + An array of arguments to be passed to new Workers + + + + + + + + &reftitle.returnvalues; + + the new Pool + + + + + &reftitle.examples; + + + Creating Pools + +something = $something; + } + + public function run() { + /** ... **/ + } +} + +$pool = new Pool(8, \MyWorker::class, [new Something()]); + +var_dump($pool); +?> +]]> + + &example.outputs; + + + int(8) + ["class":protected]=> + string(8) "MyWorker" + ["workers":protected]=> + NULL + ["work":protected]=> + NULL + ["ctor":protected]=> + array(1) { + [0]=> + object(Something)#2 (0) { + } + } + ["last":protected]=> + int(0) +} +]]> + + + + + + + +