ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Threading.TJamInterlocked
Jam_Threading_TJamInterlocked
Syntax
Pascal
TJamInterlocked = class sealed;

Class containing threadsafe functions similar to System.SyncObjs.TInterlocked

marder@jam-software.com

 
Name 
Description 
 
If pVar is nil, an instance of T is created and assigned to pVar. This is done in a threadsafe way.  
 
If pIntf is nil, an instance is created by calling pFactoryMethod and assigned to pVar. This is done in a threadsafe way.  
 
Assigns an interface to a variable and releases the previous interface (if assigned) in an atomic and so threadsafe operation.  
 
Assigns an interface to a variable, but only if this was empty, in an atomic and so threadsafe operation.  
 
Releases an interface in an atomic and so threadsafe operation  
 
Assigns an interface to a variable and returns the previous interface (if assigned) in an atomic and so threadsafe operation  
 
Assigns pNewValue to pVar in an atomic operation if the new value is higher than the current one.