Swoole\Http\Server::start
Swoole\Lock::__construct
Swoole
PHP Manual
The Swoole\Lock class
(PHP 5 >= 5.2.0, PHP 7, PECL swoole >= 1.9.0)
Introduction
Class synopsis
Swoole\Lock
{
/* Methods */
public
void
__destruct
(
void
)
public
void
lock_read
(
void
)
public
void
lock
(
void
)
public
void
trylock_read
(
void
)
public
void
trylock
(
void
)
public
void
unlock
(
void
)
}
Table of Contents
Swoole\Lock::__construct
— Construct a memory lock.
Swoole\Lock::__destruct
— Destory a Swoole memory lock.
Swoole\Lock::lock_read
— Lock a read-write lock for reading.
Swoole\Lock::lock
— Try to acquire the lock. It will block if the lock is not available.
Swoole\Lock::trylock_read
— Try to lock a read-write lock for reading and return straight away even the lock is not available.
Swoole\Lock::trylock
— Try to acquire the lock and return straight away even the lock is not available.
Swoole\Lock::unlock
— Release the lock.
Swoole\Http\Server::start
Swoole\Lock::__construct
Swoole
PHP Manual