mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
updates for parallel
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@347388 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
09b078144a
commit
3c45ac9139
3 changed files with 21 additions and 4 deletions
|
@ -27,6 +27,21 @@
|
|||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Closures over Channels</title>
|
||||
<para>
|
||||
A powerful feature of parallel channels is that they allow the exchange of closures between tasks (and runtimes).
|
||||
</para>
|
||||
<para>
|
||||
When a closure is sent over a channel the closure is buffered, it doesn't change the buffering of the channel transmitting the closure,
|
||||
but it does effect the static scope inside the closure: The same closure sent to different runtimes, or the same runtime,
|
||||
will not share their static scope.
|
||||
</para>
|
||||
<para>
|
||||
This means that whenever a closure is executed that was transmitted by a channel, static state will be as it was when the closure was buffered.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="parallel-channel.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</warning>
|
||||
<warning>
|
||||
<para>
|
||||
Shall throw <type>\parallel\Channel\Error\IllegalValue</type> if value is illegal (object, null).
|
||||
Shall throw <type>\parallel\Channel\Error\IllegalValue</type> if value is illegal.
|
||||
</para>
|
||||
</warning>
|
||||
</refsect1>
|
||||
|
|
|
@ -62,14 +62,16 @@
|
|||
<para>
|
||||
Instructions prohibited in Closures intended for parallel execution are:
|
||||
<simplelist>
|
||||
<member>declare (anonymous) class</member>
|
||||
<member>declare named function</member>
|
||||
<member>declare named class</member>
|
||||
<member>declare anonymous class</member>
|
||||
<member>use (by-reference)</member>
|
||||
<member>yield</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Only declare class instructions are prohibited in closures or functions that are nested in tasks, no instructions are prohibited in the files which the task may include.
|
||||
No instructions are prohibited in the files which the task may include.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
@ -80,7 +82,7 @@
|
|||
Arguments must not:
|
||||
<simplelist>
|
||||
<member>contain references</member>
|
||||
<member>contain objects</member>
|
||||
<member>contain objects (that are not closures)</member>
|
||||
<member>contain resources</member>
|
||||
</simplelist>
|
||||
<note>
|
||||
|
|
Loading…
Reference in a new issue