Skip to content

Commit

Permalink
Re #7218. Lock the workspace during the clone operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellTaylor committed Jun 4, 2013
1 parent 51e7c3c commit 4f65381
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Code/Mantid/Framework/DataHandling/src/MonitorLiveData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ For details on the way to specify the data processing steps, see: [[LoadLiveData
#include <Poco/Thread.h>
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/MemoryManager.h"
#include "MantidKernel/WriteLock.h"

using namespace Mantid::Kernel;
using namespace Mantid::API;
Expand Down Expand Up @@ -90,6 +91,7 @@ namespace DataHandling
// Give a buffer of 3 times the size of the workspace
if (size_t(3)*bytesUsed < bytesAvail)
{
WriteLock _lock(*original);
Algorithm_sptr cloner = createChildAlgorithm("CloneWorkspace", 0, 0, false);
cloner->setPropertyValue("InputWorkspace", originalName);
cloner->setPropertyValue("OutputWorkspace", newName);
Expand Down

0 comments on commit 4f65381

Please sign in to comment.