Swoole\Atomic->cmpset

Declaration

<?php
Swoole\Atomic->cmpset ( int $cmp = 0, int $new = 0 )

Parameters

cmp

The old value to compare with.

new

The new value

Return

Description

Compare and set the value of the atomic object. See more about Compare and set.

Example