CompareExchangeEx

<< Click to Display Table of Contents >>

Navigation:  Classes > TIWInterlocked > Methods >

CompareExchangeEx

SIGNATURE=IW.Common.Interlocked.TIWInterlocked.CompareExchangeEx@Integer@Integer@Integer

 

ETYPE=Method

 

Declaration:

Delphi:

public class function CompareExchangeEx(var Target: Integer; Value: Integer; var Comparand: Integer): Boolean; static;

C++:

public: static __fastcall bool CompareExchangeEx(int Target, int Value, int Comparand);

 

Description: Returns TRUE if CAS operation succeeds. If it fails, Comparand will be updated with new value of Target Ideal for updating maximum/minimum values within a loop