Skip to content
Snippets Groups Projects
Commit cb735fb8 authored by Janik Zikovsky's avatar Janik Zikovsky
Browse files

Refs #3348: Thread-safe progress updates when rebinning in PV.

parent 231ae835
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment