PHP 8.4.0 RC4 available for testing

Swoole\Atomic::cmpset

(PECL swoole >= 1.9.0)

Swoole\Atomic::cmpsetCompare and set the value of the atomic object.

Beschreibung

public Swoole\Atomic::cmpset(int $cmp_value, int $new_value): int

Parameter-Liste

cmp_value

The value to compare with the current value of the atomic object.

new_value

The value to set to the atomic object if the cmp_value is the same as the current value of the atomic object.

Rückgabewerte

The new value of the atomic object.

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top