MtxForLoop::ThreadedWhileLoop Function

bool ThreadedWhileLoop(TWhileLoopEvent MyLoop, TMtxForLoop *Threads, const DewArray<tObject *> &Context);

Call this function to initiate threaded while-loop.

#NameTypeDescription
1MyLoopTWhileLoopEvent
2ThreadsTMtxForLoop *
3Contextconst DewArray<tObject *> &
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.

Use MtxVec.DoWhileLoop to take advantage of super-conductive MtxVec object cache. Calling ThreadedWhileLoop in parallel from multiple threads will not work. The call is to be protected with a critical section or otherwise.

Declared in Dew::Math::Units::MtxForLoop · Dew.Math/Units.MtxForLoop.h · Cross-compiler