#include "gui/mrview/sync/processlock.h"
Public Member Functions | |
ProcessLock (const QString &key) | |
~ProcessLock () | |
bool | IsAnotherRunning () |
bool | TryToRun () |
void | Release () |
Can be used to prevent multiple processes accessing a resource at the same time. QLockFile is another option but not available in Qt 4.8 Use TryToRun(), check the returned value on whether to continue or not, then call Release when done.
Definition at line 38 of file processlock.h.
MR::GUI::MRView::Sync::ProcessLock::ProcessLock | ( | const QString & | key | ) |
MR::GUI::MRView::Sync::ProcessLock::~ProcessLock | ( | ) |
bool MR::GUI::MRView::Sync::ProcessLock::IsAnotherRunning | ( | ) |
void MR::GUI::MRView::Sync::ProcessLock::Release | ( | ) |
bool MR::GUI::MRView::Sync::ProcessLock::TryToRun | ( | ) |