CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
edm::service::InitRootHandlers::ThreadTracker Class Reference
Inheritance diagram for edm::service::InitRootHandlers::ThreadTracker:

Public Types

typedef tbb::concurrent_unordered_set< pthread_t > Container_type
 

Public Member Functions

const Container_typeIDs ()
 
void on_scheduler_entry (bool) override
 
 ThreadTracker ()
 

Private Attributes

Container_type threadIDs_
 

Detailed Description

Definition at line 72 of file InitRootHandlers.cc.

Member Typedef Documentation

typedef tbb::concurrent_unordered_set<pthread_t> edm::service::InitRootHandlers::ThreadTracker::Container_type

Definition at line 74 of file InitRootHandlers.cc.

Constructor & Destructor Documentation

edm::service::InitRootHandlers::ThreadTracker::ThreadTracker ( )
inline

Definition at line 76 of file InitRootHandlers.cc.

76 : tbb::task_scheduler_observer() { observe(true); }

Member Function Documentation

const Container_type& edm::service::InitRootHandlers::ThreadTracker::IDs ( )
inline

Definition at line 86 of file InitRootHandlers.cc.

References threadIDs_.

Referenced by edm::service::InitRootHandlers::threadIDs().

void edm::service::InitRootHandlers::ThreadTracker::on_scheduler_entry ( bool  )
inlineoverride

Definition at line 77 of file InitRootHandlers.cc.

References edm::CurrentModuleOnThread::getCurrentModuleOnThread(), and threadIDs_.

77  {
78  // ensure thread local has been allocated; not necessary on Linux with
79  // the current cmsRun linkage, but could be an issue if the platform
80  // or linkage leads to "lazy" allocation of the thread local. By
81  // referencing it here we make sure it has been allocated and can be
82  // accessed safely from our signal handler.
84  threadIDs_.insert(pthread_self());
85  }
static ModuleCallingContext const * getCurrentModuleOnThread()

Member Data Documentation

Container_type edm::service::InitRootHandlers::ThreadTracker::threadIDs_
private

Definition at line 89 of file InitRootHandlers.cc.

Referenced by IDs(), and on_scheduler_entry().