glibmm 2.66.10

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

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

`#include <glibmm/thread.h>`

Inheritance diagram for Glib::StaticRecMutex:
[legend]

## Public Member Functions
void | lock ()
bool | trylock ()
void | unlock ()
void | lock_full (unsigned int depth)
unsigned int | unlock_full ()
| operator RecMutex & ()
GStaticRecMutex * | gobj ()

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

## Detailed Description

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

Use `GLIBMM_STATIC_REC_MUTEX_INIT` to initialize a StaticRecMutex:

Glib::StaticRecMutex mutex = GLIBMM_STATIC_REC_MUTEX_INIT;
Glib::StaticRecMutex
Like Glib::RecMutex, but can be defined at compile time.
Definition thread.h:519
Glib::StaticRecMutex::GLIBMM_STATIC_REC_MUTEX_INIT
#define GLIBMM_STATIC_REC_MUTEX_INIT
Initializer macro for Glib::StaticRecMutex.
Definition thread.h:74

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

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

## Member Function Documentation

## ◆ gobj()

GStaticRecMutex * Glib::StaticRecMutex::gobj | ( |  | ) |
| inline

## ◆ lock()

void Glib::StaticRecMutex::lock | ( |  | ) |

## ◆ lock_full()

void Glib::StaticRecMutex::lock_full | ( | unsigned int | depth | ) |

## ◆ operator RecMutex &()

Glib::StaticRecMutex::operator RecMutex & | ( |  | ) |

## ◆ trylock()

bool Glib::StaticRecMutex::trylock | ( |  | ) |

## ◆ unlock()

void Glib::StaticRecMutex::unlock | ( |  | ) |

## ◆ unlock_full()

unsigned int Glib::StaticRecMutex::unlock_full | ( |  | ) |

## Friends And Related Symbol Documentation

## ◆ GLIBMM_STATIC_REC_MUTEX_INIT

#define GLIBMM_STATIC_REC_MUTEX_INIT
| related

Initializer macro for Glib::StaticRecMutex.

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