cartobase  5.0.5
carto::LoopThread Class Reference

#include <cartobase/thread/loopThread.h>

Inheritance diagram for carto::LoopThread:
Collaboration diagram for carto::LoopThread:

Public Member Functions

 LoopThread (ThreadedLoop *parent)
 
virtual ~LoopThread ()
 
bool finished () const
 
void setFinished (bool x)
 
SemaphoreholdSemaphore ()
 the thread automatically locks on this semaphore at start and at the beginning of each run (in multiple run mode). More...
 
SemaphoreendSemaphore ()
 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)
 

Detailed Description

Definition at line 52 of file loopThread.h.

Constructor & Destructor Documentation

◆ LoopThread()

carto::LoopThread::LoopThread ( ThreadedLoop parent)

◆ ~LoopThread()

virtual carto::LoopThread::~LoopThread ( )
virtual

Member Function Documentation

◆ doRun()

virtual void carto::LoopThread::doRun ( )
protectedvirtual

Implements carto::Thread.

◆ endSemaphore()

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

◆ finished()

bool carto::LoopThread::finished ( ) const

◆ holdSemaphore()

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

◆ setFinished()

void carto::LoopThread::setFinished ( bool  x)

Member Data Documentation

◆ _parent

ThreadedLoop* carto::LoopThread::_parent
protected

Definition at line 77 of file loopThread.h.


The documentation for this class was generated from the following file: