mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 09:52:17 +01:00
86 lines
1.9 KiB
XML
86 lines
1.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 7febeefab69aa2920922de7adfe17724148d0b60 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xml:id="pool.shutdown" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>Pool::shutdown</refname>
|
|
<refpurpose>Arrête tous les workers</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>void</type><methodname>Pool::shutdown</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Arrête tous les workers de ce Pool. Cela se bloquera jusqu'à ce que toutes
|
|
les tâches soumises aient été exécutées.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.void;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Shutting down a pool</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
class Task extends Threaded
|
|
{
|
|
public function run()
|
|
{
|
|
usleep(500000);
|
|
}
|
|
}
|
|
|
|
$pool = new Pool(4);
|
|
|
|
for ($i = 0; $i < 10; ++$i) {
|
|
$pool->submit(new Task());
|
|
}
|
|
|
|
$pool->shutdown(); // blocs jusqu'à ce que toutes les tâches soumises aient terminé l'exécution
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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
|
|
-->
|