moar docs for pool

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332928 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Joe Watkins 2014-03-06 16:36:30 +00:00
parent 2afba07f11
commit 211f60bb0a
2 changed files with 17 additions and 0 deletions

View file

@ -31,6 +31,16 @@
Additionally, any context with a reference to the Stackable can read, write and execute its methods before during and after execution.
</para>
<para>
A Pool:
A Pool of Worker threads can be used to distribute Stackables among programmer declared Worker classes. The Pool class included implements this functionality and takes care of referencing in a sane manner.
Introduced in v1.0.0, the Pool implementation is the easiest and most efficient way of using multiple threads.
</para>
<caution>
<para>
Pool is a normal PHP object, and so instances should not be shared among contexts.
</para>
</caution>
<para>
Synchronization:
All of the objects that pthreads creates have built in synchronization in the ( familiar to java programmers ) form of ::wait and ::notify.
Calling ::wait on an object will cause the context to wait for another context to call ::notify on the same object.

View file

@ -59,6 +59,13 @@
<function name='stackable::merge' from='PECL pthreads &gt;= 0.45'/>
<function name='stackable::chunk' from='PECL pthreads &gt;= 0.45'/>
<function name='pool::__construct' from='PECL pthreads &gt;= 1.0.0'/>
<function name='pool::resize' from='PECL pthreads &gt;= 1.0.0'/>
<function name='pool::submit' from='PECL pthreads &gt;= 1.0.0'/>
<function name='pool::collect' from='PECL pthreads &gt;= 1.0.0'/>
<function name='pool::shutdown' from='PECL pthreads &gt;= 1.0.0'/>
<function name='pool::__destruct' from='PECL pthreads &gt;= 1.0.0'/>
<function name='mutex' from='PECL pthreads &gt;= 0.34'/>
<function name='mutex::create' from='PECL pthreads &gt;= 0.34'/>
<function name='mutex::lock' from='PECL pthreads &gt;= 0.34'/>