« Swoole\Async::writeFile
Swoole\Atomic::add »
PHP Manual
Swoole
The Swoole\Atomic class
The Swoole\Atomic class
(PECL swoole >= 1.9.0)
简介
类摘要
class
Swoole\Atomic
{
/* 方法 */
public
add
(
int
$add_value
= ?
):
int
public
cmpset
(
int
$cmp_value
,
int
$new_value
):
int
public
get
():
int
public
set
(
int
$value
):
int
public
sub
(
int
$sub_value
= ?
):
int
}
目录
Swoole\Atomic::add
— Add a number to the value to the atomic object.
Swoole\Atomic::cmpset
— Compare and set the value of the atomic object.
Swoole\Atomic::__construct
— Construct a swoole atomic object.
Swoole\Atomic::get
— Get the current value of the atomic object.
Swoole\Atomic::set
— Set a new value to the atomic object.
Swoole\Atomic::sub
— Subtract a number to the value of the atomic object.