mirror of
https://github.com/php/doc-zh.git
synced 2026-03-24 15:12:20 +01:00
61 lines
2.2 KiB
XML
61 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- $Revision$ -->
|
||
<!-- EN-Revision: bf92d8bd839301de7c837d20ab1dac6c14f83bbf Maintainer: yuanyuqiang Status: ready -->
|
||
<!-- CREDITS: mowangjuanzi, Luffy -->
|
||
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="pthreads.setup">
|
||
&reftitle.setup;
|
||
|
||
<section xml:id="pthreads.requirements">
|
||
&reftitle.required;
|
||
<simpara>
|
||
要使用 pthreads 扩展,需要构建 PHP 时启用 ZTS(Zend 线程安全)(<option role="configure">--enable-zts</option> 或在
|
||
PHP 8.0 之前的非 Windows 平台为 <option role="configure">--enable-maintainer-zts</option>)。
|
||
</simpara>
|
||
<caution>
|
||
<simpara>
|
||
ZTS 是构建期配置选项,只能通过构建时通过选项启用,无法在构建之后启用。
|
||
</simpara>
|
||
</caution>
|
||
<simpara>
|
||
要构建 pthreads 扩展,你需要启用了 ZTS 的 PHP 以及 Posix Threads 头文件(pthread.h)。对于 Windows 平台,需要使用 redhat 的 pthread-w32 项目中的 pthread.h 头文件。
|
||
</simpara>
|
||
</section>
|
||
|
||
<section xml:id="pthreads.installation">
|
||
&reftitle.install;
|
||
<simpara>
|
||
pthreads 扩展由 PECL 主持,使用 <link xlink:href="&url.git.hub;krakjoe/pthreads">github</link> 管理源代码。
|
||
使用标准的 PECL 包安装方式就可以完成安装:<link xlink:href="&url.pecl.package;pthreads">&url.pecl.package;pthreads</link>。
|
||
</simpara>
|
||
<simpara>
|
||
Windows 用户可以从 <link xlink:href="&url.pecl.package;pthreads">PECL</link> 下载已经构建的二进制发行包。
|
||
</simpara>
|
||
<caution>
|
||
<simpara>
|
||
Windows 用户需要将 pthreadVC2.dll (包含在 Windows 版二进制发行包中)所在路径加入到 <envar>PATH</envar> 环境变量中。
|
||
</simpara>
|
||
</caution>
|
||
</section>
|
||
|
||
</chapter>
|
||
<!-- Keep this comment at the end of the file
|
||
Local variables:
|
||
mode: sgml
|
||
sgml-omittag:t
|
||
sgml-shorttag:t
|
||
sgml-minimize-attributes:nil
|
||
sgml-always-quote-attributes:t
|
||
sgml-indent-step:1
|
||
sgml-indent-data:t
|
||
indent-tabs-mode:nil
|
||
sgml-parent-document:nil
|
||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||
sgml-exposed-tags:nil
|
||
sgml-local-catalogs:nil
|
||
sgml-local-ecat-files:nil
|
||
End:
|
||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||
vim: et tw=78 syn=sgml
|
||
vi: ts=1 sw=1
|
||
-->
|