SQLiteXX  0.1.0
 All Classes Namespaces Files Functions Enumerations Enumerator
Public Member Functions | List of all members
sqlite::mutex Class Reference

Helps with serializing access to a database connection. More...

#include <Mutex.h>

Public Member Functions

void lock () noexcept
 Locks the mutex and blocks if the mutex is not available.
 
bool try_lock () noexcept
 Tries to lock the mutex, returns if the mutex is not available. More...
 
void unlock () noexcept
 Unlocks the mutex.
 

Detailed Description

Helps with serializing access to a database connection.

mutexes are only useful when threading mode is set to "Serialized".

This mutex class can be used with std::lock_guard as it meets the BasicLockable requirements.

Definition at line 19 of file Mutex.h.

Member Function Documentation

bool sqlite::mutex::try_lock ( )
noexcept

Tries to lock the mutex, returns if the mutex is not available.

Returns
True if able to obtain lock. False otherwise.

Definition at line 14 of file Mutex.cpp.


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