Skip to content
Snippets Groups Projects
Commit 2ee900c6 authored by Anton Piccardo-Selg's avatar Anton Piccardo-Selg
Browse files

Refs #15288 Change MultiThreaded header

parent 62a5da6d
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
#define MANTID_KERNEL_MULTITHREADED_H_
#include <Poco/Mutex.h>
#include <mutex>
namespace Mantid {
namespace Kernel {
......@@ -11,9 +12,15 @@ namespace Kernel {
/// General mutex (typedef'd to Poco::FastMutex). Not recursive in general;
/// don't assume it is!
typedef Poco::FastMutex Mutex;
typedef Poco::Mutex RecursiveMutex;
//typedef Poco::FastMutex Mutex;
//typedef Poco::Mutex RecursiveMutex;
typedef std::mutex Mutex;
typedef std::recursive_mutex RecursiveMutex;
typedef std::lock_guard<Mutex> LockGuardMutex;
typedef std::lock_guard<RecursiveMutex> LockGuardRecursiveMutex;
typedef std::unique_lock<Mutex> UniqueLockMutex;
} // namespace
} // namespace
......
......@@ -198,10 +198,9 @@ unsigned long vtkMDEWNexusReader::GetMTime()
*/
void vtkMDEWNexusReader::updateAlgorithmProgress(double progress, const std::string& message)
{
progressMutex.lock();
Mantid::Kernel::LockGuardMutex lock(progressMutex);
this->SetProgressText(message.c_str());
this->UpdateProgress(progress);
progressMutex.unlock();
}
/** Helper function to setup the time range.
......
......@@ -204,10 +204,9 @@ unsigned long vtkMDHWNexusReader::GetMTime()
*/
void vtkMDHWNexusReader::updateAlgorithmProgress(double progress, const std::string& message)
{
progressMutex.lock();
Mantid::Kernel::LockGuardMutex lockGuard(progressMutex);
this->SetProgressText(message.c_str());
this->UpdateProgress(progress);
progressMutex.unlock();
}
/** Helper function to setup the time range.
......
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