Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
art::InputSourceMutexSentry Class Reference

#include <InputSourceMutex.h>

Public Member Functions

 ~InputSourceMutexSentry () noexcept
 
 InputSourceMutexSentry ()
 
 InputSourceMutexSentry (InputSourceMutexSentry const &)=delete
 
InputSourceMutexSentryoperator= (InputSourceMutexSentry const &)=delete
 

Static Public Member Functions

static hep::concurrency::RecursiveMutex * startup ()
 
static void shutdown ()
 

Private Attributes

hep::concurrency::RecursiveMutexSentry sentry_
 

Static Private Attributes

static hep::concurrency::RecursiveMutex * inputSourceMutex_
 

Friends

class AutoInputSourceMutexSentryShutdown
 

Detailed Description

Definition at line 9 of file InputSourceMutex.h.

Constructor & Destructor Documentation

art::InputSourceMutexSentry::~InputSourceMutexSentry ( )
defaultnoexcept
art::InputSourceMutexSentry::InputSourceMutexSentry ( )

Definition at line 56 of file InputSourceMutex.cc.

57  : sentry_{(inputSourceMutex_ == nullptr) ? *startup() : *inputSourceMutex_,
58  __func__}
59  {}
static hep::concurrency::RecursiveMutex * inputSourceMutex_
static hep::concurrency::RecursiveMutex * startup()
hep::concurrency::RecursiveMutexSentry sentry_
art::InputSourceMutexSentry::InputSourceMutexSentry ( InputSourceMutexSentry const &  )
delete

Member Function Documentation

InputSourceMutexSentry& art::InputSourceMutexSentry::operator= ( InputSourceMutexSentry const &  )
delete
void art::InputSourceMutexSentry::shutdown ( )
static

Definition at line 24 of file InputSourceMutex.cc.

25  {
26  ANNOTATE_THREAD_IGNORE_BEGIN;
27  delete inputSourceMutex_;
28  inputSourceMutex_ = nullptr;
29  ANNOTATE_THREAD_IGNORE_END;
30  }
static hep::concurrency::RecursiveMutex * inputSourceMutex_
RecursiveMutex * art::InputSourceMutexSentry::startup ( )
static

Definition at line 15 of file InputSourceMutex.cc.

16  {
17  static mutex guard_mutex;
18  lock_guard sentry{guard_mutex};
19  inputSourceMutex_ = new RecursiveMutex{"art::inputSourceMutex_"};
20  return inputSourceMutex_;
21  }
static hep::concurrency::RecursiveMutex * inputSourceMutex_

Friends And Related Function Documentation

Definition at line 20 of file InputSourceMutex.h.

Member Data Documentation

RecursiveMutex * art::InputSourceMutexSentry::inputSourceMutex_
staticprivate
Initial value:
{
new RecursiveMutex{"art::inputSourceMutex_"}}

Definition at line 21 of file InputSourceMutex.h.

hep::concurrency::RecursiveMutexSentry art::InputSourceMutexSentry::sentry_
private

Definition at line 22 of file InputSourceMutex.h.


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