<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.swoole-coroutine-lock.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'pt_BR',
  ),
  'this' => 
  array (
    0 => 'swoole-coroutine-lock.trylock.php',
    1 => 'Swoole\\Coroutine\\Lock::trylock',
    2 => 'Tenta adquirir o bloqueio sem bloquear',
  ),
  'up' => 
  array (
    0 => 'class.swoole-coroutine-lock.php',
    1 => 'Swoole\\Coroutine\\Lock',
  ),
  'prev' => 
  array (
    0 => 'swoole-coroutine-lock.lock.php',
    1 => 'Swoole\\Coroutine\\Lock::lock',
  ),
  'next' => 
  array (
    0 => 'swoole-coroutine-lock.unlock.php',
    1 => 'Swoole\\Coroutine\\Lock::unlock',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'pt_BR',
    'path' => 'reference/swoole/swoole/coroutine/lock/trylock.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="swoole-coroutine-lock.trylock" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Swoole\Coroutine\Lock::trylock</h1>
  <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">Swoole\Coroutine\Lock::trylock</span> &mdash; <span class="dc-title">Tenta adquirir o bloqueio sem bloquear</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-swoole-coroutine-lock.trylock-description">
  <h3 class="title">Descrição</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Swoole\Coroutine\Lock::trylock</strong></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Ao chamar a operação de bloqueio, se o bloqueio já estiver sendo mantido por outra corrotina,
   a função retornará imediatamente falso sem suspender a corrotina atual
   ou ceder o controle da CPU. Este design não bloqueante permite que o chamador lide com flexibilidade
   com situações de contenção, como novas tentativas, desistências ou execução de outra lógica.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-swoole-coroutine-lock.trylock-parameters">
  <h3 class="title">Parâmetros</h3>
  <p class="para">Esta função não possui parâmetros.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-swoole-coroutine-lock.trylock-returnvalues">
  <h3 class="title">Valor Retornado</h3>
  <p class="para">
   Retorna <code class="literal">true</code> se o bloqueio foi adquirido com sucesso,
   <code class="literal">false</code> se o bloqueio não estiver disponível.
  </p>
 </div>

</div><?php manual_footer($setup); ?>