You are here: Symbol Reference > MtxForLoop Namespace > Classes > TMtxForLoop Class > public > TMtxForLoop.CancelProcessing Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxForLoop.CancelProcessing Method

Call to cancel the processing.

Pascal
procedure CancelProcessing;

This will indicate that looping should stop, but to quit any processing within threaded procedure has to be checked by the procedure explicitely. 

 

procedure MyLoopRange(IdxStart, IdxEnd: integer; const Context: TObjectArray; ThreadIndex: integer); var j, k: integer; a: TMtx; begin a := TMtx(Context[0]); for k := IdxStart to IdxEnd do //additional vectorization possible inside these two loops begin for j := 0 to a.Cols - 1 do begin a[k, j] := a[k, j] + 1; end; //Check, if we need to finish prematurely mtxForLoop[ThreadIndex].CancelProcessing then Exit; end; end;
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!