mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-24 17:02:18 +01:00
101 lines
2.4 KiB
XML
101 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 0da76b0197f60f498c56cc7a57c243b3865ce6b7 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xml:id="syncmutex.lock" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>SyncMutex::lock</refname>
|
|
<refpurpose>Obtient un verrou exclusif</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>bool</type><methodname>SyncMutex::lock</methodname>
|
|
<methodparam choice="opt"><type>int</type><parameter>wait</parameter><initializer>-1</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Obtient un verrou exclusif sur un objet <classname>SyncMutex</classname>.
|
|
Si le verrou est déjà acquis, alors cette méthode va incrémenter le
|
|
compteur interne.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>wait</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le nombre de millisecondes à attendre pour l'obtention du verrou
|
|
exclusif. Une valeur -1 signifie que l'on attend indéfiniement.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Exemple avec <function>SyncMutex::lock</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$mutex = new SyncMutex("UniqueName");
|
|
|
|
if (!$mutex->lock(3000))
|
|
{
|
|
echo "Impossible de verrouiller le mutex.";
|
|
|
|
exit();
|
|
}
|
|
|
|
/* ... */
|
|
|
|
$mutex->unlock();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member><methodname>SyncMutex::unlock</methodname></member>
|
|
</simplelist>
|
|
</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
|
|
-->
|