Graphite
Version 3
An experimental 3D geometry processing program
|
Single thread ThreadManager. More...
#include <geogram/basic/process.h>
Public Member Functions | |
index_t | maximum_concurrent_threads () override |
Gets the maximum number of possible concurrent threads. More... | |
Public Member Functions inherited from GEO::ThreadManager | |
virtual void | run_threads (ThreadGroup &threads) |
Runs a group of Threads. 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... | |
Protected Member Functions | |
~MonoThreadingThreadManager () override | |
void | run_concurrent_threads (ThreadGroup &threads, index_t max_threads) override |
Runs a group of Threads concurrently. More... | |
Protected Member Functions inherited from GEO::ThreadManager | |
~ThreadManager () override | |
Protected Member Functions inherited from GEO::Counted | |
Counted () | |
Creates a reference counted object. More... | |
virtual | ~Counted () |
Destroys a reference counted object. More... | |
Additional Inherited Members | |
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... | |
Static Protected Member Functions inherited from GEO::ThreadManager | |
static void | set_thread_id (Thread *thread, index_t id) |
Sets the id of a thread. More... | |
static void | set_current_thread (Thread *thread) |
Specifies the current instance, used by current(). More... | |
Single thread ThreadManager.
MonoThreadingThreadManager implements a ThreadManager for single thread environments.
|
overrideprotected |
MonoThreadingThreadManager destructor
|
overridevirtual |
Gets the maximum number of possible concurrent threads.
Implements GEO::ThreadManager.
|
overrideprotectedvirtual |
Runs a group of Threads concurrently.
This start the concurrent execution of the threads contained in vector threads
, using the given number of threads max_threads
. The execution terminates when the last thread terminates.
[in] | threads | the vector of threads to be executed. |
[in] | max_threads | maximum number of threads allowed for this execution. It is always greater than one |
Implements GEO::ThreadManager.