php-doc-en/reference/pthreads/thread/stack.xml
Joe Watkins e714aaa78f remove evil tabs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@327787 c90b9560-bf6c-de11-be94-00142212c4b1
2012-09-25 20:42:14 +00:00

64 lines
2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="thread.stack" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Thread::stack</refname>
<refpurpose>Push work onto the stack for execution by the referenced Thread</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <type>int</type><methodname>Thread::stack</methodname>
<methodparam><type>Object</type><parameter>work</parameter></methodparam>
</methodsynopsis>
<para>
Pushing work onto the stack of an executing Thread automatically turns that Thread into a Worker.
A Worker Thread will automatically pop work off the stack and execute the items run method.
A Worker Thread is available until a call to <function>Thread::join</function> is recieved.
The return value of the run method of an executed item is ignored, until the last execution on the stack.
The last item on the stack has the return value of run available to the caller of <function>Thread::join</function> on the Worker Thread.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>work</parameter></term>
<listitem>
<para>An item of the same type as the referenced Thread</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>The size of stack after work was added.</para>
</refsect1>
</refentry>
<!-- 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
-->