diff --git a/Code/Mantid/Vates/ParaviewPlugins/ParaViewReaders/EventNexusReader/vtkEventNexusReader.cxx b/Code/Mantid/Vates/ParaviewPlugins/ParaViewReaders/EventNexusReader/vtkEventNexusReader.cxx index 578f708aa2b8149d3b11ea70a0023adc1ef18e82..dd24b6ebecd52eb1bfe19b1387e0815d9a13ea9f 100644 --- a/Code/Mantid/Vates/ParaviewPlugins/ParaViewReaders/EventNexusReader/vtkEventNexusReader.cxx +++ b/Code/Mantid/Vates/ParaviewPlugins/ParaViewReaders/EventNexusReader/vtkEventNexusReader.cxx @@ -543,6 +543,8 @@ unsigned long vtkEventNexusReader::GetMTime() */ void vtkEventNexusReader::UpdateAlgorithmProgress(double progress) { + progressMutex.lock(); this->SetProgressText("Executing Mantid MDEvent Rebinning Algorithm..."); this->UpdateProgress(progress); + progressMutex.unlock(); } diff --git a/Code/Mantid/Vates/ParaviewPlugins/ParaViewReaders/EventNexusReader/vtkEventNexusReader.h b/Code/Mantid/Vates/ParaviewPlugins/ParaViewReaders/EventNexusReader/vtkEventNexusReader.h index 84623032f7bb501cf44374694f353c1be8c786c0..237a0c9503c97616ab2ec4806699b654f625d49b 100644 --- a/Code/Mantid/Vates/ParaviewPlugins/ParaViewReaders/EventNexusReader/vtkEventNexusReader.h +++ b/Code/Mantid/Vates/ParaviewPlugins/ParaViewReaders/EventNexusReader/vtkEventNexusReader.h @@ -6,6 +6,7 @@ #include "MantidVatesAPI/EscalatingRebinningActionManager.h" #include "MantidGeometry/MDGeometry/MDGeometryXMLBuilder.h" #include "MantidVatesAPI/ThresholdRange.h" +#include "MantidKernel/MultiThreaded.h" class vtkImplicitFunction; class VTK_EXPORT vtkEventNexusReader : public vtkUnstructuredGridAlgorithm @@ -156,5 +157,8 @@ private: int m_thresholdMethodIndex; Mantid::VATES::ThresholdRange_scptr m_ThresholdRange; + + /// Mutex for thread-safe progress reporting. + Mantid::Kernel::Mutex progressMutex; }; #endif