Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Latest commit

 

History

History
10 lines (8 loc) · 342 Bytes

6.4.6 - swoole_atomic->cmpset.md

File metadata and controls

10 lines (8 loc) · 342 Bytes

swoole_atomic->cmpset

如果当前数值等于参数1,则将当前数值设置为参数2

function swoole_atomic->cmpset(int $cmp_value, int $set_value);
  • 如果当前数值等于$cmp_value返回true,并将当前数值设置为$set_value
  • 如果不等于返回false
  • $cmp_value,$set_value 必须为小于42亿的整数