MtxVec.DoWhileLoop Method

Boolean DoWhileLoop(TWhileLoopEvent MyLoop, TMtxForLoop Threads, Object[] Context)

Call this function to initiate threaded while-loop.

#NameTypeDescription
1MyLoopTWhileLoopEvent
2ThreadsTMtxForLoop
3ContextObject[]

Returns: Boolean

Remarks:

The MyLoop method pointer must be a function (not object method). This is the function that will be called until Stop parameter of MyLoop will be returned as True. Threads parameter requires a TMtxForLoop object and Context can be used to pass any parameters to the threaded function.

This overload will take advantage of the super-conductive MtxVec object cache, if MtxVec.Controller.ThreadDimension is more than Threads.ThreadCount+1. Calling DoForLoop in parallel from multiple threads will not work. The call is to be protected with a critical section or otherwise.