glibmm: Glib::StaticRWLock Struct Reference

glibmm 2.66.9

Public Member Functions | Related Symbols | List of all members
Glib::StaticRWLock Struct Reference

Like Glib::RWLock, but can be defined at compile time. More...

`#include <glibmm/thread.h>`

Inheritance diagram for Glib::StaticRWLock:
[legend]

## Public Member Functions
void | reader_lock ()
bool | reader_trylock ()
void | reader_unlock ()
void | writer_lock ()
bool | writer_trylock ()
void | writer_unlock ()
| operator RWLock & ()
GStaticRWLock * | gobj ()

## Related Symbols
(Note that these are not member symbols.)
#define | GLIBMM_STATIC_RW_LOCK_INIT
| Initializer macro for Glib::StaticRWLock.

## Detailed Description

Like Glib::RWLock, but can be defined at compile time.

Use `GLIBMM_STATIC_RW_LOCK_INIT` to initialize a StaticRWLock:

Glib::StaticRWLock rw_lock = GLIBMM_STATIC_RW_LOCK_INIT;
Glib::StaticRWLock
Like Glib::RWLock, but can be defined at compile time.
Definition thread.h:595
Glib::StaticRWLock::GLIBMM_STATIC_RW_LOCK_INIT
#define GLIBMM_STATIC_RW_LOCK_INIT
Initializer macro for Glib::StaticRWLock.
Definition thread.h:82

A StaticRWLock can be used without calling Glib::thread_init(), it will silently do nothing then. That will also work when using the implicit conversion to RWLock&, thus you can safely use RWLock::ReaderLock and RWLock::WriterLock with a StaticRWLock.

Deprecated
  Use Glib::Threads::RWLock instead, which can be used statically.

## Member Function Documentation

## ◆ gobj()

GStaticRWLock * Glib::StaticRWLock::gobj | ( |  | ) |
| inline

## ◆ operator RWLock &()

Glib::StaticRWLock::operator RWLock & | ( |  | ) |

## ◆ reader_lock()

void Glib::StaticRWLock::reader_lock | ( |  | ) |

## ◆ reader_trylock()

bool Glib::StaticRWLock::reader_trylock | ( |  | ) |

## ◆ reader_unlock()

void Glib::StaticRWLock::reader_unlock | ( |  | ) |

## ◆ writer_lock()

void Glib::StaticRWLock::writer_lock | ( |  | ) |

## ◆ writer_trylock()

bool Glib::StaticRWLock::writer_trylock | ( |  | ) |

## ◆ writer_unlock()

void Glib::StaticRWLock::writer_unlock | ( |  | ) |

## Friends And Related Symbol Documentation

## ◆ GLIBMM_STATIC_RW_LOCK_INIT

#define GLIBMM_STATIC_RW_LOCK_INIT
| related

Initializer macro for Glib::StaticRWLock.

Deprecated
  Glib::StaticRWLock is deprecated in favour of Glib::Threads::RWLock, which can be used statically.