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\Coroutine\Lock::trylockSwoole\Event>
^Swoole\Coroutine\LockLast updated: Mon, 26 Oct 2026

Swoole\Coroutine\Lock::unlock

(No version information available, might only be in Git)

Swoole\Coroutine\Lock::unlock — Release the lock

Description

public function Swoole\Coroutine\Lock::unlock(): bool

Unlock Behavior

  1. With io_uring futex: the system will precisely wake up one coroutine in the waiting queue.

  2. Without io_uring futex: waiting coroutines need to wait for their backoff time to end and compete to reacquire the lock.

Parameters

This function has no parameters.

Return Values

Returns true if the lock was released successfully, false otherwise.


<Swoole\Coroutine\Lock::trylockSwoole\Event>
^Swoole\Coroutine\LockLast updated: Mon, 26 Oct 2026