glibmm 2.56.0

Classes | Enumerations | Functions
Threads

Thread abstraction; including threads, different mutexes, conditions and thread private data. More...

## Classes
class | Glib::Threads::ThreadError
| Exception class for thread-related errors. More...
class | Glib::Threads::Thread::Exit
| Exception class used to exit from a thread. More...
class | Glib::Threads::Thread
| Represents a running thread. More...
class | Glib::Threads::Mutex::Lock
| Utility class for exception-safe mutex locking. More...
class | Glib::Threads::Mutex
| Represents a mutex (mutual exclusion). More...
class | Glib::Threads::RecMutex::Lock
| Utility class for exception-safe locking of recursive mutexes. More...
class | Glib::Threads::RecMutex
| This represents a recursive mutex. More...
class | Glib::Threads::RWLock::ReaderLock
| Utility class for exception-safe locking of read/write locks. More...
class | Glib::Threads::RWLock::WriterLock
| Utility class for exception-safe locking of read/write locks. More...
class | Glib::Threads::RWLock
| This represents a reader-writer lock. More...
class | Glib::Threads::Cond
| An opaque data structure to represent a condition. More...
class | Glib::Threads::Private< T >
| Thread-local data pointer. More...
class | Glib::Dispatcher
| Signal class for inter-thread communication. More...

## Enumerations
enum | Glib::Threads::NotLock { Glib::Threads::NOT_LOCK }
enum | Glib::Threads::TryLock { Glib::Threads::TRY_LOCK }

## Functions
Thread* | wrap (GThread* gobject)
| A C++ wrapper for the C object. More...
Mutex* | wrap (GMutex* gobject)
| A C++ wrapper for the C object. More...
RecMutex* | wrap (GRecMutex* gobject)
| A C++ wrapper for the C object. More...

## Detailed Description

Thread abstraction; including threads, different mutexes, conditions and thread private data.

Deprecated:
  The entire Glib::Threads API is deprecated in favor of the standard C++ concurrency API in C++11 and C++14.

## Enumeration Type Documentation

## ◆ NotLock

enum Glib::Threads::NotLock

Deprecated:
  Please use std::lock_guard or std::unique_lock instead.

Enumerator
NOT_LOCK |

## ◆ TryLock

enum Glib::Threads::TryLock

Deprecated:
  Please use std::lock_guard or std::unique_lock instead.

Enumerator
TRY_LOCK |

## Function Documentation

## ◆ wrap() [1/3]

Thread* wrap | ( | GThread * | gobject | ) |
| related

A C++ wrapper for the C object.

Parameters

  gobject | The C instance.

Returns
  The C++ wrapper.

Deprecated:
  Please use std::thread instead.

## ◆ wrap() [2/3]

Mutex* wrap | ( | GMutex * | gobject | ) |
| related

A C++ wrapper for the C object.

Do not use operator delete on the returned pointer. If the caller owns the GMutex object, the caller must destroy it in the same way as if this function had not been called.

Parameters

  gobject | The C instance.

Returns
  The GMutex* cast to a Glib::Threads::Mutex*.

## ◆ wrap() [3/3]

RecMutex* wrap | ( | GRecMutex * | gobject | ) |
| related

A C++ wrapper for the C object.

Do not use operator delete on the returned pointer. If the caller owns the GRecMutex object, the caller must destroy it in the same way as if this function had not been called.

Parameters

  gobject | The C instance.

Returns
  The GRecMutex* cast to a Glib::Threads::RecMutex*.