![]() |
Rosetta
2021.16
|
A singleton that tracks whether we have already launched threads or not. More...
#include <RosettaThreadManagerInitializationTracker.hh>
Public Member Functions | |
| bool | thread_manager_initialization_begun () const |
| Determine whether thread launch has started. More... | |
| void | mark_thread_manager_initialization_as_begun () |
| Store the fact that thread lauch has started. More... | |
| bool | thread_manager_was_initialized () const |
| Determine whether threads have been launched. More... | |
| void | mark_thread_manager_as_initialized () |
| Store the fact that threads have been launched. More... | |
| platform::Size | total_threads () const |
| Get the total number of threads that have been launched or which will be launched. More... | |
Public Member Functions inherited from utility::SingletonBase< RosettaThreadManagerInitializationTracker > | |
| SingletonBase () | |
| public constructor (the derived class must have a private constructor, of course). More... | |
Private Member Functions | |
| RosettaThreadManagerInitializationTracker () | |
| RosettaThreadManagerInitializationTracker (RosettaThreadManagerInitializationTracker const &)=delete | |
| RosettaThreadManagerInitializationTracker | operator= (RosettaThreadManagerInitializationTracker const &)=delete |
Private Attributes | |
| bool | thread_manager_initialization_begun_ = false |
| bool | thread_manager_was_initialized_ = false |
| platform::Size | total_threads_ = 0 |
Friends | |
| class | utility::SingletonBase< RosettaThreadManagerInitializationTracker > |
Additional Inherited Members | |
Static Public Member Functions inherited from utility::SingletonBase< RosettaThreadManagerInitializationTracker > | |
| static RosettaThreadManagerInitializationTracker * | get_instance () |
| Safely instantiate a singleton class in a (possibly) multithreaded context. More... | |
A singleton that tracks whether we have already launched threads or not.
|
private |
References runtime_assert_string_msg, and total_threads_.
|
privatedelete |
| void basic::thread_manager::RosettaThreadManagerInitializationTracker::mark_thread_manager_as_initialized | ( | ) |
Store the fact that threads have been launched.
References thread_manager_was_initialized_.
| void basic::thread_manager::RosettaThreadManagerInitializationTracker::mark_thread_manager_initialization_as_begun | ( | ) |
Store the fact that thread lauch has started.
References thread_manager_initialization_begun_.
|
privatedelete |
| bool basic::thread_manager::RosettaThreadManagerInitializationTracker::thread_manager_initialization_begun | ( | ) | const |
Determine whether thread launch has started.
References thread_manager_initialization_begun_.
| bool basic::thread_manager::RosettaThreadManagerInitializationTracker::thread_manager_was_initialized | ( | ) | const |
Determine whether threads have been launched.
References thread_manager_was_initialized_.
|
inline |
Get the total number of threads that have been launched or which will be launched.
Read from options system. If options system specifies "0", set to number of cores in system.
References total_threads_.
|
friend |
|
private |
Referenced by mark_thread_manager_initialization_as_begun(), and thread_manager_initialization_begun().
|
private |
Referenced by mark_thread_manager_as_initialized(), and thread_manager_was_initialized().
|
private |
Referenced by RosettaThreadManagerInitializationTracker(), and total_threads().
1.8.7