Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
basic::thread_manager::RosettaThreadManagerInitializationTracker Class Reference

A singleton that tracks whether we have already launched threads or not. More...

#include <RosettaThreadManagerInitializationTracker.hh>

Inheritance diagram for basic::thread_manager::RosettaThreadManagerInitializationTracker:
Inheritance graph
[legend]

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...
 

Detailed Description

A singleton that tracks whether we have already launched threads or not.

Constructor & Destructor Documentation

basic::thread_manager::RosettaThreadManagerInitializationTracker::RosettaThreadManagerInitializationTracker ( )
private
basic::thread_manager::RosettaThreadManagerInitializationTracker::RosettaThreadManagerInitializationTracker ( RosettaThreadManagerInitializationTracker const &  )
privatedelete

Member Function Documentation

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_.

RosettaThreadManagerInitializationTracker basic::thread_manager::RosettaThreadManagerInitializationTracker::operator= ( RosettaThreadManagerInitializationTracker const &  )
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_.

platform::Size basic::thread_manager::RosettaThreadManagerInitializationTracker::total_threads ( ) const
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_.

Friends And Related Function Documentation

Member Data Documentation

bool basic::thread_manager::RosettaThreadManagerInitializationTracker::thread_manager_initialization_begun_ = false
private
bool basic::thread_manager::RosettaThreadManagerInitializationTracker::thread_manager_was_initialized_ = false
private
platform::Size basic::thread_manager::RosettaThreadManagerInitializationTracker::total_threads_ = 0
private

The documentation for this class was generated from the following files: