|
Geogram Version 1.8.5
A programming library of geometric algorithms
|
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. | |
Public Member Functions inherited from GEO::Counted | |
| void | ref () const |
| Increments the reference count. | |
| void | unref () const |
| Decrements the reference count. | |
| bool | is_shared () const |
| Check if the object is shared. | |
| int | nb_refs () const |
| Gets the number of references that point to this object. | |
Static Public Member Functions | |
| static Thread * | current () |
| Gets the current thread. | |
Static Public Member Functions inherited from GEO::Counted | |
| static void | ref (const Counted *counted) |
| Increments the reference count. | |
| static void | unref (const Counted *counted) |
| Decrements the reference count. | |
Protected Member Functions | |
| ~Thread () override | |
Protected Member Functions inherited from GEO::Counted | |
| Counted () | |
| Creates a reference counted object. | |
| virtual | ~Counted () |
| Destroys a reference counted object. | |
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.
|
inline |
|
friend |