OpenSwoole\Atomic->cmpset

Latest version: pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5

Declaration

<?php OpenSwoole\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

Last updated on September 1, 2022