From 3c45ac913920d28c716a957f592051dad977a6de Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Mon, 6 May 2019 10:55:49 +0000 Subject: [PATCH] updates for parallel git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@347388 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/parallel/parallel.channel.xml | 15 +++++++++++++++ reference/parallel/parallel/channel/send.xml | 2 +- reference/parallel/parallel/runtime/run.xml | 8 +++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/reference/parallel/parallel.channel.xml b/reference/parallel/parallel.channel.xml index 5fc9361e13..c6bb80c7a5 100644 --- a/reference/parallel/parallel.channel.xml +++ b/reference/parallel/parallel.channel.xml @@ -27,6 +27,21 @@ +
+ Closures over Channels + + A powerful feature of parallel channels is that they allow the exchange of closures between tasks (and runtimes). + + + 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. + + + 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. + +
+
&reftitle.classsynopsis; diff --git a/reference/parallel/parallel/channel/send.xml b/reference/parallel/parallel/channel/send.xml index e90dcada28..9f9ec5ebdb 100644 --- a/reference/parallel/parallel/channel/send.xml +++ b/reference/parallel/parallel/channel/send.xml @@ -28,7 +28,7 @@ - Shall throw \parallel\Channel\Error\IllegalValue if value is illegal (object, null). + Shall throw \parallel\Channel\Error\IllegalValue if value is illegal. diff --git a/reference/parallel/parallel/runtime/run.xml b/reference/parallel/parallel/runtime/run.xml index 630299d9b8..60a33ac594 100644 --- a/reference/parallel/parallel/runtime/run.xml +++ b/reference/parallel/parallel/runtime/run.xml @@ -62,14 +62,16 @@ Instructions prohibited in Closures intended for parallel execution are: - declare (anonymous) class + declare named function + declare named class + declare anonymous class use (by-reference) yield - 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. @@ -80,7 +82,7 @@ Arguments must not: contain references - contain objects + contain objects (that are not closures) contain resources