|
Geogram Version 1.9.7
A programming library of geometric algorithms
|
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. | |
Public Member Functions inherited from GEO::ThreadManager | |
| virtual void | run_threads (ThreadGroup &threads) |
| Runs a group of Threads. | |
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. | |
Protected Member Functions | |
| ~MonoThreadingThreadManager () override | |
| void | run_concurrent_threads (ThreadGroup &threads, index_t max_threads) override |
| Runs a group of Threads concurrently. | |
Protected Member Functions inherited from GEO::ThreadManager | |
| ~ThreadManager () override | |
Protected Member Functions inherited from GEO::Counted | |
| Counted () | |
| Creates a reference counted object. | |
| virtual | ~Counted () |
| Destroys a reference counted object. | |
Additional Inherited Members | |
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. | |
Static Protected Member Functions inherited from GEO::ThreadManager | |
| static void | set_thread_id (Thread *thread, index_t id) |
| Sets the id of a thread. | |
| static void | set_current_thread (Thread *thread) |
| Specifies the current instance, used by current(). | |
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.