glibmm  2.62.0
About: glibmm is a set of C++ bindings for glib, including cross-platform APIs such as a std::string-like UTF8 string class, string utility methods, such as a text encoding converter API, file access, and threads.
  Fossies Dox: glibmm-2.62.0.tar.xz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

Threads

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

Classes

class  Glib::Dispatcher
 Signal class for inter-thread communication. More...
 
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...
 

Enumerations

enum  Glib::Threads::NotLock { Glib::Threads::NOT_LOCK }
 
enum  Glib::Threads::TryLock { Glib::Threads::TRY_LOCK }
 

Functions

Threadwrap (GThread *gobject)
 A C++ wrapper for the C object. More...
 
Mutexwrap (GMutex *gobject)
 A C++ wrapper for the C object. More...
 
RecMutexwrap (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

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

Definition at line 58 of file threads.h.

◆ TryLock

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

Definition at line 61 of file threads.h.

Function Documentation

◆ wrap() [1/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
gobjectThe C instance.
Returns
The GMutex* cast to a Glib::Threads::Mutex*.

Definition at line 191 of file threads.cc.

◆ wrap() [2/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
gobjectThe C instance.
Returns
The GRecMutex* cast to a Glib::Threads::RecMutex*.

Definition at line 227 of file threads.cc.

◆ wrap() [3/3]

Thread * wrap ( GThread *  gobject)
related

A C++ wrapper for the C object.

Parameters
gobjectThe C instance.
Returns
The C++ wrapper.
Deprecated:
Please use std::thread instead.

Definition at line 195 of file thread.cc.