Skip to content

Commit

Permalink
Merge pull request #1085 from Dr15Jones/clearEventSelectorThreadSafely
Browse files Browse the repository at this point in the history
Multithreaded framework -- Clear the event selector in a thread safe manner
  • Loading branch information
ktf committed Oct 17, 2013
2 parents ae1032b + 35964b0 commit a6043d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion FWCore/Framework/src/OutputModule.cc
Expand Up @@ -180,12 +180,12 @@ namespace edm {
OutputModule::doEvent(EventPrincipal const& ep,
EventSetup const&,
ModuleCallingContext const* mcc) {
detail::TRBESSentry products_sentry(selectors_);

FDEBUG(2) << "writeEvent called\n";

{
std::lock_guard<std::mutex> guard(mutex_);
detail::TRBESSentry products_sentry(selectors_);
if(!wantAllEvents_) {
if(!selectors_.wantEvent(ep, mcc)) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Framework/src/one/OutputModuleBase.cc
Expand Up @@ -187,10 +187,10 @@ namespace edm {
OutputModuleBase::doEvent(EventPrincipal const& ep,
EventSetup const&,
ModuleCallingContext const* mcc) {
detail::TRBESSentry products_sentry(selectors_);

{
std::lock_guard<std::mutex> guard(mutex_);
detail::TRBESSentry products_sentry(selectors_);
if(!wantAllEvents_) {
if(!selectors_.wantEvent(ep, mcc)) {
return true;
Expand Down

0 comments on commit a6043d1

Please sign in to comment.