PHP Manual
Function Reference
Other Basic Extensions
Swoole
Introduction
Installing/Configuring
Predefined Constants
Swoole Functions
Swoole\Async
Swoole\Atomic
Swoole\Buffer
Swoole\Channel
Swoole\Client
Swoole\Connection\Iterator
Swoole\Coroutine
Swoole\Event
Swoole\Exception
Swoole\Http\Client
Swoole\Http\Request
Swoole\Http\Response
Swoole\Http\Server
Swoole\Lock
Swoole\Mmap
Swoole\MySQL
Swoole\MySQL\Exception
Swoole\Process
Swoole\Redis\Server
Swoole\Serialize
Swoole\Server
Swoole\Table
Swoole\Timer
Swoole\WebSocket\Frame
Swoole\WebSocket\Server
Swoole\Async::writeFile
Swoole\Atomic::add
Swoole
PHP Manual
The Swoole\Atomic class
Introduction
Class synopsis
Swoole\Atomic
class
Swoole\Atomic
{
/* Methods */
public
int
add
(
int
$add_value
= ?
)
public
int
cmpset
(
int
$cmp_value
,
int
$new_value
)
public
int
get
()
public
int
set
(
int
$value
)
public
int
sub
(
int
$sub_value
= ?
)
}
Table of Contents
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.