TMtxForLoop.CombinedLoopIndex Method

function CombinedLoopIndex: Integer;

Returns combined loop iteration Index to determine the progress of the computation.

Returns: Int32

Remarks:

When processing a range loop (threaded function has min and max parameters) it is the users responsability to update Thread.LoopIndex variable, if this indicator is required. Example:

IntInterlockedIncrement(Thread.LoopIndex);

This is because the actual loop runs within the users code. This function will return the sum of iterations added to the starting Min value.

In case of a while-loop, the CombinedLoopIndex and CombinedLoopCount returns the same result. The user is not allowed to increase Thread.LoopIndex

In case of a for-loop without specified range the function will return the sum of iterations added to the starting Min value. The user is not allowed to increase Thread.LoopIndex