Developer documentation
Version 3.0.3-105-gd3941f44
MR::GUI::MRView::Sync::ProcessLock Class Reference

#include "gui/mrview/sync/processlock.h"

Public Member Functions

 ProcessLock (const QString &key)
 
 ~ProcessLock ()
 
bool IsAnotherRunning ()
 
bool TryToRun ()
 
void Release ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ProcessLock()

MR::GUI::MRView::Sync::ProcessLock::ProcessLock ( const QString &  key)

◆ ~ProcessLock()

MR::GUI::MRView::Sync::ProcessLock::~ProcessLock ( )

Member Function Documentation

◆ IsAnotherRunning()

bool MR::GUI::MRView::Sync::ProcessLock::IsAnotherRunning ( )

◆ Release()

void MR::GUI::MRView::Sync::ProcessLock::Release ( )

◆ TryToRun()

bool MR::GUI::MRView::Sync::ProcessLock::TryToRun ( )

The documentation for this class was generated from the following file: