The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
ThreadInitTask.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
15#include <GaudiKernel/SmartIF.h>
17
18#include <boost/thread.hpp>
19#include <string>
20#include <vector>
21
28
30
31public:
32 ThreadInitTask( ToolHandleArray<IThreadInitTool>& tools, boost::barrier* b, ISvcLocator* svcLocator,
33 bool terminate = false )
34 : m_tools( tools ), m_barrier( b ), m_serviceLocator( svcLocator ), m_terminate( terminate ){};
35
40 void operator()() const;
41
42 static bool execFailed() { return m_execFailed; }
43
44private:
46
47 boost::barrier* m_barrier = nullptr;
49 bool m_terminate = false;
50
51 static std::atomic<bool> m_execFailed;
52};
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition ISvcLocator.h:42
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
static bool execFailed()
boost::barrier * m_barrier
SmartIF< ISvcLocator > m_serviceLocator
ThreadInitTask(ToolHandleArray< IThreadInitTool > &tools, boost::barrier *b, ISvcLocator *svcLocator, bool terminate=false)
ToolHandleArray< IThreadInitTool > m_tools
static std::atomic< bool > m_execFailed
void operator()() const
Execute the task.
Array of Handles to be used in lieu of vector of naked pointers to tools.
Definition ToolHandle.h:399