cartobase
5.0.5
|
#include <cartobase/thread/loopThread.h>
Public Member Functions | |
LoopThread (ThreadedLoop *parent) | |
virtual | ~LoopThread () |
bool | finished () const |
void | setFinished (bool x) |
Semaphore * | holdSemaphore () |
the thread automatically locks on this semaphore at start and at the beginning of each run (in multiple run mode). More... | |
Semaphore * | endSemaphore () |
The ThreadedLoop locks on this semaphore to wait for a run end (in multiple run mode) and is released by this ThreadLoop after each run. More... | |
Public Member Functions inherited from carto::Thread | |
Thread () | |
virtual | ~Thread () |
virtual void | launch () |
This is the function which should actually called to run a thread. More... | |
virtual void | start () |
Call launch(), not start() More... | |
virtual void | run () |
Call launch(), not run() More... | |
virtual void | stop () |
virtual void | reset () |
virtual void | join () |
virtual void | detach () |
void | setSuicideSafe (bool x=true) |
In suicide-safe mode, Thread can be deleted (or auto-deleted) while the threaded job is still running: doPostLaunch() and stop() are not executed. More... | |
bool | isSuicideSafe () const |
virtual void | setCancellable (bool value, bool callStop) |
virtual void | cancel () |
virtual bool | isActive () const |
virtual bool | isCurrent () const |
Protected Member Functions | |
virtual void | doRun () |
Protected Member Functions inherited from carto::Thread | |
virtual void | testCancel () |
virtual void | doStart () |
virtual void | doStop () |
virtual void | doPreLaunch () |
virtual void | doPostLaunch () |
Protected Attributes | |
ThreadedLoop * | _parent |
Protected Attributes inherited from carto::Thread | |
bool | _detached |
bool | _cancellable |
bool | _callStop |
Additional Inherited Members | |
Static Public Member Functions inherited from carto::Thread | |
static bool | currentIsMainThread () |
static void * | bootstrap (void *thread) |
Definition at line 52 of file loopThread.h.
carto::LoopThread::LoopThread | ( | ThreadedLoop * | parent | ) |
|
virtual |
|
protectedvirtual |
Implements carto::Thread.
Semaphore* carto::LoopThread::endSemaphore | ( | ) |
The ThreadedLoop locks on this semaphore to wait for a run end (in multiple run mode) and is released by this ThreadLoop after each run.
In single run mode, 0 is returned
bool carto::LoopThread::finished | ( | ) | const |
Semaphore* carto::LoopThread::holdSemaphore | ( | ) |
the thread automatically locks on this semaphore at start and at the beginning of each run (in multiple run mode).
In single run mode, 0 is returned
void carto::LoopThread::setFinished | ( | bool | x | ) |
|
protected |
Definition at line 77 of file loopThread.h.