Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Swoole\Lock::lock_readSwoole\Lock::trylock_read>
^Swoole\LockLast updated: Mon, 26 Oct 2026

Swoole\Lock::trylock

(PECL swoole >= 1.9.0)

Swoole\Lock::trylock — Try to acquire the lock and return straight away even the lock is not available.

Description

public function Swoole\Lock::trylock(): void

Parameters

This function has no parameters.

Return Values


<Swoole\Lock::lock_readSwoole\Lock::trylock_read>
^Swoole\LockLast updated: Mon, 26 Oct 2026