NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
This is a mutex that uses files to perform locking. It implements the Mutex named requirements. More...
#include <FileMutex.hpp>
Public Member Functions | |
FileMutex (const std::string filePath) | |
Creates a FileMutex using a file specified as filePath. More... | |
~FileMutex () | |
closes the internal file but does not release the mutex. The behavior is undefined if the mutex is owned by any thread or if any thread terminates while holding any ownership of the mutex. More... | |
FileMutex (const FileMutex &)=delete | |
FileMutex (FileMutex &&)=delete | |
FileMutex & | operator= (const FileMutex &)=delete |
FileMutex & | operator= (FileMutex &&)=delete |
void | lock () |
lock the mutex More... | |
bool | try_lock () |
try locking the mutex More... | |
void | unlock () |
try unlocking the file More... | |
This is a mutex that uses files to perform locking. It implements the Mutex named requirements.
|
explicit |
Creates a FileMutex using a file specified as filePath.
filePath | that path to a file |
References NES_ASSERT2_FMT.
NES::Util::FileMutex::~FileMutex | ( | ) |
closes the internal file but does not release the mutex. The behavior is undefined if the mutex is owned by any thread or if any thread terminates while holding any ownership of the mutex.
|
delete |
|
delete |
void NES::Util::FileMutex::lock | ( | ) |
lock the mutex
References fd, and NES_ASSERT.
Referenced by try_lock(), and unlock().
bool NES::Util::FileMutex::try_lock | ( | ) |
void NES::Util::FileMutex::unlock | ( | ) |
try unlocking the file
References fd, lock(), and NES_ASSERT.