# glibmm: Glib::Threads::RWLock::WriterLock Class Reference

Glib::Threads::RWLock::WriterLock Class Reference
Threads

Utility class for exception-safe locking of read/write locks. More...

`#include <glibmm/threads.h>`

## Public Member Functions

| WriterLock (RWLock& rwlock)
| WriterLock (RWLock& rwlock, NotLock)
| WriterLock (RWLock& rwlock, TryLock)
| WriterLock (const RWLock::WriterLock&)=delete
RWLock::WriterLock& | operator= (const RWLock::WriterLock&)=delete
| ~WriterLock ()
void | acquire ()
bool | try_acquire ()
void | release ()
bool | locked () const

## Detailed Description

Utility class for exception-safe locking of read/write locks.

Deprecated:
  Please use std::lock_guard or std::unique_lock instead, with std::shared_timed_mutex.

## Constructor & Destructor Documentation

Glib::Threads::RWLock::WriterLock::WriterLock | ( | RWLock& | rwlock | ) |

inlineexplicit

Glib::Threads::RWLock::WriterLock::WriterLock | ( | RWLock& | rwlock,
|  | NotLock |
| ) |  |

inline

Glib::Threads::RWLock::WriterLock::WriterLock | ( | RWLock& | rwlock,
|  | TryLock |
| ) |  |

inline

Glib::Threads::RWLock::WriterLock::WriterLock | ( | const RWLock::WriterLock& |  | ) |

delete

Glib::Threads::RWLock::WriterLock::~WriterLock | ( |  | ) |

inline

## Member Function Documentation

void Glib::Threads::RWLock::WriterLock::acquire | ( |  | ) |

inline

bool Glib::Threads::RWLock::WriterLock::locked | ( |  | ) | const

inline

RWLock::WriterLock& Glib::Threads::RWLock::WriterLock::operator= | ( | const RWLock::WriterLock& |  | ) |

delete

void Glib::Threads::RWLock::WriterLock::release | ( |  | ) |

inline

bool Glib::Threads::RWLock::WriterLock::try_acquire | ( |  | ) |

inline