mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
some more docs for parallel
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@347390 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3c45ac9139
commit
a5d3bbcbbd
2 changed files with 45 additions and 0 deletions
|
@ -8,6 +8,21 @@
|
|||
|
||||
<partintro>
|
||||
|
||||
<section>
|
||||
<title>Events Input</title>
|
||||
<para>
|
||||
An Input object is a container for data that the <classname>parallel\Events</classname> object will write to
|
||||
<classname>parallel\Channel</classname> objects as they become available. Multiple event loops may share an Input container - parallel does not
|
||||
verify the contents of the container when it is set as the input for a <classname>parallel\Events</classname> object.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
When a <classname>parallel\Events</classname> object performs a write, the target is removed from the input object as if
|
||||
<methodname>parallel\Events\Input::remove</methodname> were called.
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section xml:id="parallel-events-input.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
|
|
|
@ -8,6 +8,36 @@
|
|||
|
||||
<partintro>
|
||||
|
||||
<section>
|
||||
<title>Runtime Objects</title>
|
||||
<para>
|
||||
Each runtime represents a single PHP thread, the thread is created (and bootstrapped) upon construction.
|
||||
The thread then waits for tasks to be scheduled: Scheduled tasks will be executed FIFO and then the thread will resume waiting until
|
||||
more tasks are scheduled, or it's closed, killed, or destroyed by the normal scoping rules of PHP objects.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
When a runtime is destroyed by the normal scoping rules of PHP objects, it will first execute all of the tasks that were scheduled,
|
||||
and block while doing so.
|
||||
</para>
|
||||
</warning>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Runtime Bootstrapping</title>
|
||||
<para>
|
||||
When a new runtime is created, it does not share code with the thread (or process) that created it. This means it doesn't have the same
|
||||
classes and functions loaded, nor the same autoloader set. In some cases, a very lightweight runtime is desirable because the tasks that
|
||||
will be scheduled do not need access to the code in the parent thread. In those cases where the tasks do need to access the same code, it
|
||||
is enough to set an autoloader as the bootstrap.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
preloading may be used in conjunction with parallel, in this case preloaded code is available without bootstrapping
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section xml:id="parallel-runtime.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
|
|
Loading…
Reference in a new issue