6 #include <unordered_set> 25 :
base_class( name, svcLoc ), m_isActive( false )
42 if ( !sc.
isSuccess() ) warning() <<
"Base class could not be initialized" <<
endmsg;
45 info() <<
"Activating scheduler in a separate thread" <<
endmsg;
59 if ( !sc.
isSuccess() ) warning() <<
"Base class could not be finalized" <<
endmsg;
62 if ( !sc.
isSuccess() ) warning() <<
"Scheduler could not be deactivated" <<
endmsg;
64 info() <<
"Joining preemptive scheduler's thread" <<
endmsg;
87 info() <<
"Start checking the queue of I/O-bound algorithm tasks.." <<
endmsg;
125 auto actionn = [&]() {
126 debug() <<
" .. launching I/O-bound algo-closure .. " <<
endmsg;
StatusCode initialize() override
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
StatusCode finalize() override
bool isSuccess() const
Test for a status code of SUCCESS.
bool m_isActive
Flag to track if the scheduler is active or not.
Header file for class GaudiAlgorithm.
std::thread m_thread
The thread in which the activate function runs.
~IOBoundAlgSchedulerSvc() override
Destructor.
virtual StatusCode execute()=0
StatusCode initialize() override
Initialise.
General interface for a wrapper around Gaudi algorithm.
This class is used for returning status codes from appropriate routines.
StatusCode deactivate()
Deactivate scheduler.
#define DECLARE_SERVICE_FACTORY(x)
Base class used to extend a class implementing other interfaces.
void activate()
Activate scheduler.
StatusCode push(IAlgTask &task) override
Add an algorithm to local queue to run on accelerator.
StatusCode finalize() override
Finalise.
Please refer to the full documentation of the methods for more details.
tbb::concurrent_bounded_queue< action > m_actionsQueue
This is done since the copy of the lambda storage is too expensive.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.