Skip to content

Commit

Permalink
Re #7489. Add back mutex per Pete's instructions.
Browse files Browse the repository at this point in the history
Hoping that this will fix sporadic failures in system (LoadLotsOfFiles
& BASISAutoReduction) & unit (ModeratorTzeroLinear) tests that load
BASIS data.
  • Loading branch information
RussellTaylor committed Jul 23, 2013
1 parent 0604dd9 commit aac45c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ class ProcessBankData : public Task
double tof = static_cast<double>( event_time_of_flight[i] );
if ((tof >= alg->filter_tof_min) && (tof <= alg->filter_tof_max))
{
alg->m_eventVectorMutex.lock();
// Handle simulated data if present
if (have_weight)
{
Expand Down Expand Up @@ -329,6 +330,8 @@ class ProcessBankData : public Task

// Track all the touched wi (only necessary when compressing events, for thread safety)
if (compress) usedDetIds[detId-m_min_id] = true;

alg->m_eventVectorMutex.unlock();
} // valid time-of-flight

} // valid detector IDs
Expand Down

0 comments on commit aac45c4

Please sign in to comment.