Skip to content

Commit

Permalink
Merge pull request #3578 from Dr15Jones/fixPrefetchForConcurrentModul…
Browse files Browse the repository at this point in the history
…eTimer

Multithreading -- Fix problems with prefetch and ConcurrentModuleTimer
  • Loading branch information
ktf committed Apr 30, 2014
2 parents c0c20b3 + 260aa06 commit 8d1cfb9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions FWCore/Services/plugins/ConcurrentModuleTimer.cc
Expand Up @@ -20,6 +20,7 @@
#include "FWCore/Utilities/interface/CPUTimer.h"
#include "FWCore/ServiceRegistry/interface/ServiceMaker.h"
#include "FWCore/ServiceRegistry/interface/SystemBounds.h"
#include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h"


namespace edm {
Expand Down Expand Up @@ -72,11 +73,15 @@ m_startedTiming(false)
stop();
});

iReg.watchPreModuleEventDelayedGet([this](StreamContext const&, ModuleCallingContext const&){
stop();
iReg.watchPreModuleEventDelayedGet([this](StreamContext const&, ModuleCallingContext const& iContext){
if(iContext.state() == ModuleCallingContext::State::kRunning) {
stop();
}
});
iReg.watchPostModuleEventDelayedGet([this](StreamContext const&, ModuleCallingContext const&){
start();
iReg.watchPostModuleEventDelayedGet([this](StreamContext const&, ModuleCallingContext const& iContext){
if(iContext.state() == ModuleCallingContext::State::kRunning) {
start();
}
});

iReg.watchPreallocate([this](edm::service::SystemBounds const& iBounds){
Expand Down

0 comments on commit 8d1cfb9

Please sign in to comment.