mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added some 4.3.0 changes to the docs, see bug #20189. This is information out of
an email to php-dev from Jason Greene on the subject. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@113189 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d0c2fee396
commit
e6d1fdd519
1 changed files with 22 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<reference id="ref.pcntl">
|
||||
<title>Process Control Functions</title>
|
||||
<titleabbrev>PCNTL</titleabbrev>
|
||||
|
@ -21,8 +21,26 @@
|
|||
systems documentation including fork(2), waitpid(2) and signal(2)
|
||||
or a comprehensive reference such as Advanced Programming in the
|
||||
UNIX Environment by W. Richard Stevens (Addison-Wesley).
|
||||
</para>
|
||||
¬e.no-windows.extension;
|
||||
</para>
|
||||
<para>
|
||||
PCNTL now uses ticks as the signal handle callback mechanism, which is
|
||||
much faster than the previous mechanism. This change follows the same
|
||||
semantics as using "user ticks". You use the <function>declare</function>
|
||||
statement to specify the locations in your program where callbacks are
|
||||
allowed to occur. This allows you to minimize the overhead of handling
|
||||
asynchronous events. In the past, compiling PHP with pcntl enabled would
|
||||
always incur this overhead, whether or not your script actually used
|
||||
pcntl.
|
||||
</para>
|
||||
<para>
|
||||
There is one adjustment that all pcntl scripts prior to PHP 4.3.0 must
|
||||
make for them to work which is to either to use
|
||||
<function>declare</function> on a section where you wish to allow
|
||||
callbacks or to just enable it across the entire script using
|
||||
the new global syntax of <function>declare</function>.
|
||||
</para>
|
||||
|
||||
¬e.no-windows.extension;
|
||||
</section>
|
||||
|
||||
<section id="pcntl.requirements">
|
||||
|
@ -54,6 +72,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
declare(ticks=1);
|
||||
|
||||
$pid = pcntl_fork();
|
||||
if ($pid == -1) {
|
||||
|
|
Loading…
Reference in a new issue