ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Threading.TJamInterlocked.SetEqualOrHigher
Syntax
Pascal
class function SetEqualOrHigher(var pVar: UInt64; const pNewValue: UInt64): Boolean; static;
Parameters 
Description 
var pVar: UInt64 
The variable or member that should be assigned to. 
const pNewValue: UInt64 
The new value that should get assigned. 

True if the givern value was higher and was assignedf, False if pVar was not changed.

Assigns pNewValue to pVar in an atomic operation if the new value is higher than the current one.

Useful e.g. for searching a maximum with multiple threads.