All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ThreadInitTask.h
Go to the documentation of this file.
1 #ifndef GAUDIHIVE_THREADINITTASK_H
2 #define GAUDIHIVE_THREADINITTASK_H
3 
4 #include "GaudiKernel/SmartIF.h"
8 
9 #include <vector>
10 #include <string>
11 #include "tbb/task.h"
12 #include "boost/thread.hpp"
13 
21 class ThreadInitTask: virtual public tbb::task
22 
23 {
24 
25 public:
27  boost::barrier* b,
29  bool terminate=false):
30  m_tools(tools), m_barrier(b), m_serviceLocator(svcLocator),
31  m_terminate(terminate){};
32 
37  tbb::task* execute() override;
38 
39  static bool execFailed() { return m_execFailed; }
40 
41 private:
42 
44 
45  boost::barrier *m_barrier;
48 
50 
51 };
52 
53 #endif
ThreadInitTask(ToolHandleArray< IThreadInitTool > &tools, boost::barrier *b, ISvcLocator *svcLocator, bool terminate=false)
tbb::task * execute() override
Execute the task.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
SmartIF< ISvcLocator > m_serviceLocator
static std::atomic< bool > m_execFailed
Special TBB task used by ThreadPoolSvc to wrap execution of IThreadInitTools.
ToolHandleArray< IThreadInitTool > & m_tools
GAUDI_API ISvcLocator * svcLocator()
static bool execFailed()
boost::barrier * m_barrier