Main Page Widgets glibmm Namespaces Book

# Glib::StaticRWLock Struct Reference
[Threads]

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

Inheritance diagram for Glib::StaticRWLock:

[legend]
List of all members.

## 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 Functions

(Note that these are not member functions.)
| 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;

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.

## Member Function Documentation

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

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

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

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

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

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

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

GStaticRWLock* Glib::StaticRWLock::gobj | ( |  | ) | `[inline]`

## Friends And Related Function Documentation

GLIBMM_STATIC_RW_LOCK_INIT`[related]`

Initializer macro for Glib::StaticRWLock.

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

- thread.h