# The Swoole\Atomic class

(PHP 5 >= 5.2.0, PHP 7, PECL swoole >= 1.9.0)

## Introduction

## Synopsis de la classe

Swoole\Atomic {
/* Méthodes */
public add ([ integer `$add_value` ] ) : integer
public cmpset ( integer `$cmp_value` , integer `$new_value` ) : integer
public get ( void ) : integer
public set ( integer `$value` ) : integer
public sub ([ integer `$sub_value` ] ) : integer
}

## Sommaire

- 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.