Swoole\Coroutine\Lock::trylock
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
Swoole\Coroutine\Lock::trylock
Референца за `swoole-coroutine-lock.trylock.php` со подобрена типографија и навигација.
Swoole\Coroutine\Lock::trylock
(Нема достапни информации за верзијата, можеби е само во Git)
Swoole\Coroutine\Lock::trylock — Attempt to acquire the lock without blocking
= NULL
When calling the lock operation, if the lock is already held by another coroutine, the function will immediately return false without suspending the current coroutine or yielding CPU control. This non-blocking design allows the caller to flexibly handle contention situations, such as retrying, giving up, or executing other logic.
Параметри
Оваа функција нема параметри.
Вратени вредности
Патеката до PHP скриптата што треба да се провери. true if the lock was acquired successfully,
false if the lock is not available.