Loading...
Searching...
No Matches
SharedMutex Class Reference

The SharedMutex class provides a simple wrapper for the C++17 shared_mutex class. More...

`#include <avogadro/core/sharedmutex.h>`

## Public Member Functions

void | lockForRead ()
| Obtain a shared read lock.
bool | tryLockForRead ()
| Attempt to obtain a shared read lock.
void | unlockForRead ()
| Unlocks the exclusive write lock.
void | lockForWrite ()
| Obtain an exclusive write lock.
bool | tryLockForWrite ()
| Attempt to obtain an exclusive write lock.
void | unlockForWrite ()
| Unlocks the exclusive write lock.

## Detailed Description

Author
  Marcus D. Hanwell

A very simple, and thin wrapper around the C++17 shared_mutex class, allowing for lock, tryLock and unlock.

## Member Function Documentation

## tryLockForRead()

bool tryLockForRead | ( |  | ) |

Returns
  True on success, false on failure.

## tryLockForWrite()

bool tryLockForWrite | ( |  | ) |

Returns
  True on success, false on failure.

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

- sharedmutex.h