1
0
mirror of https://github.com/php/doc-zh.git synced 2026-03-24 15:12:20 +01:00
Files
archived-doc-zh/reference/pthreads/thread.xml

97 lines
2.8 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: bf92d8bd839301de7c837d20ab1dac6c14f83bbf Maintainer: yuanyuqiang Status: ready -->
<!-- Reviewed: no -->
<reference xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="class.thread" role="class">
<title>Thread 类</title>
<titleabbrev>Thread</titleabbrev>
<partintro>
<!-- {{{ Thread intro -->
<section xml:id="thread.intro">
&reftitle.intro;
<simpara>
当调用 Thread 对象的 start 方法时,该对象的 run 方法中的代码将在独立线程中并行执行。
</simpara>
<simpara>
run 方法中的代码执行完毕之后独立线程立即退出并且等待合适的时机由创建者线程加入join
</simpara>
<warning>
<simpara>
依赖于引擎本身的机制检测何时加入线程可能引发非预期的行为,程序员应该尽可能的显式控制线程加入的时机。
</simpara>
</warning>
</section>
<!-- }}} -->
<section xml:id="thread.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>Thread</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>Thread</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>Threaded</classname>
</ooclass>
<oointerface>
<interfacename>Countable</interfacename>
</oointerface>
<oointerface>
<interfacename>Traversable</interfacename>
</oointerface>
<oointerface>
<interfacename>ArrayAccess</interfacename>
</oointerface>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.thread')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"/>
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.threaded')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"/>
</classsynopsis>
<!-- }}} -->
</section>
</partintro>
&reference.pthreads.entities.thread;
</reference>
<!-- 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
-->