35 #ifndef CARTOBASE_THREAD_THREADEDLOOP_H
36 #define CARTOBASE_THREAD_THREADEDLOOP_H
40 #ifndef CARTO_NO_THREAD
54 int startIndex,
int count,
int maxThreadCount = 0,
55 float threadsByCpu = 1.0f );
65 bool launch(
bool resetGauge =
true,
bool resetCancel =
true );
bool endThreadsWhenDone() const
The loop can work in two modes: single run (endThreadsWhenDone() is true) or multiple runs (endThread...
void run()
run one iteration step. It normally calls the LoopContext diIt() method
bool launch(bool resetGauge=true, bool resetCancel=true)
run the loop to the end until all iterations are finished
void setEndThreadsWhenDone(bool x)
Warning: it's possibly not safe to change this value from false to true after launch() has been calle...
void setLoopContext(LoopContext *)
This function is only useful in multiple run mode (endThreadsWhenDone false).
ThreadedLoop(LoopContext *loopContext, int startIndex, int count, int maxThreadCount=0, float threadsByCpu=1.0f)
bool runSingleThreaded(bool resetGauge=true, bool resetCancel=true)