|
Mir
|
An object that enforces unique access to the data it contains. More...
#include <synchronised.h>
Classes | |
| class | LockedImpl |
| Smart-pointer-esque accessor for the protected data. More... | |
Public Types | |
| using | Locked = LockedImpl< T > |
| Smart-pointer-esque accessor for the protected data. More... | |
| using | LockedView = LockedImpl< T const > |
| Smart-pointer-esque accessor for the protected data. More... | |
Public Member Functions | |
| Synchronised ()=default | |
| Synchronised (T &&initial_value) | |
| Synchronised (Synchronised const &)=delete | |
| Synchronised & | operator= (Synchronised const &)=delete |
| auto | lock () -> Locked |
| Lock the data and return an accessor. More... | |
| auto | lock () const -> LockedView |
| Lock the data and return an accessor. More... | |
An object that enforces unique access to the data it contains.
This behaves like a mutex which owns the data it guards, and can give out a smart-pointer-esque handle to lock and access it.
| T | The type of data contained |
| using mir::Synchronised< T >::Locked = LockedImpl<T> |
Smart-pointer-esque accessor for the protected data.
Ensures exclusive access to the referenced data.
| using mir::Synchronised< T >::LockedView = LockedImpl<T const> |
Smart-pointer-esque accessor for the protected data.
Provides const access to the protected data, with the guarantee that no changes to the data can be made while this handle is live.
|
default |
|
inline |
|
delete |
|
inline |
Lock the data and return an accessor.
|
inline |
Lock the data and return an accessor.
|
delete |
Copyright © 2012-2023
Canonical Ltd.
Generated on Wed Feb 1 16:59:23 UTC 2023
This documentation is licensed under the GPL version 2 or 3.