Graphite
Version 3
An experimental 3D geometry processing program
|
Platform-independent base class for running threads. More...
#include <geogram/basic/process.h>
Public Member Functions | |
Thread () | |
Thread constructor. | |
virtual void | run ()=0 |
Starts the thread execution. | |
index_t | id () const |
Gets the identifier of this thread. More... | |
Public Member Functions inherited from GEO::Counted | |
void | ref () const |
Increments the reference count. More... | |
void | unref () const |
Decrements the reference count. More... | |
bool | is_shared () const |
Check if the object is shared. More... | |
int | nb_refs () const |
Gets the number of references that point to this object. More... | |
Static Public Member Functions | |
static Thread * | current () |
Gets the current thread. More... | |
static index_t | current_id () |
Gets the identifier of the current thread. More... | |
Static Public Member Functions inherited from GEO::Counted | |
static void | ref (const Counted *counted) |
Increments the reference count. More... | |
static void | unref (const Counted *counted) |
Decrements the reference count. More... | |
Protected Member Functions | |
~Thread () override | |
Protected Member Functions inherited from GEO::Counted | |
Counted () | |
Creates a reference counted object. More... | |
virtual | ~Counted () |
Destroys a reference counted object. More... | |
Friends | |
class | ThreadManager |
Platform-independent base class for running threads.
A Thread object manages one thread of control within the program. Threads begin executing with run(). Operational threads can be created by creating a derived class and reimplement function run().
Threads are reference-counted objects. Their allocation and destruction can be automatically managed with Thread_var.
|
overrideprotected |
Thread destructor
|
static |
Gets the current thread.
|
inlinestatic |
|
inline |