略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Swoole\Atomic::cmpset

2025-02-27

Swoole\Atomic::cmpset

(PECL swoole >= 1.9.0)

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

说明

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

参数

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.

返回值

The new value of the atomic object.

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/swoole-atomic.cmpset.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3