The Gaudi Framework  v30r3 (a5ef0a68)
ThreadInitTask.h
Go to the documentation of this file.
1 #ifndef GAUDIHIVE_THREADINITTASK_H
2 #define GAUDIHIVE_THREADINITTASK_H
3 
6 #include "GaudiKernel/SmartIF.h"
8 
9 #include "boost/thread.hpp"
10 #include "tbb/task.h"
11 #include <string>
12 #include <vector>
13 
21 class ThreadInitTask : virtual public tbb::task
22 
23 {
24 
25 public:
27  bool terminate = false )
28  : m_tools( tools ), m_barrier( b ), m_serviceLocator( svcLocator ), m_terminate( terminate ){};
29 
34  tbb::task* execute() override;
35 
36  static bool execFailed() { return m_execFailed; }
37 
38 private:
40 
41  boost::barrier* m_barrier;
44 
46 };
47 
48 #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.
GAUDI_API ISvcLocator * svcLocator()
static bool execFailed()
ToolHandleArray< IThreadInitTool > m_tools
boost::barrier * m_barrier