-
Gigg, Martyn Anthony authored
Uses forward declarations where possible. Refs #8784
Gigg, Martyn Anthony authoredUses forward declarations where possible. Refs #8784
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
ReadLock.cpp 639 B
#include "MantidKernel/ReadLock.h"
#include "MantidKernel/DataItem.h"
#include <Poco/RWLock.h>
namespace Mantid
{
namespace Kernel
{
//----------------------------------------------------------------------------------------------
/** Constructor
*/
ReadLock::ReadLock(const DataItem & item)
: m_item(item)
{
// Acquire a read lock.
m_item.m_lock->readLock();
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
ReadLock::~ReadLock()
{
// Unlock
m_item.m_lock->unlock();
}
} // namespace Mantid
} // namespace Kernel