Reference documentation for deal.II version 8.4.1
Classes | Public Member Functions | Private Attributes | Friends | List of all members

#include <deal.II/base/thread_management.h>


class  ScopedLock

Public Member Functions

 Mutex ()
 Mutex (const Mutex &)
void acquire ()
void release ()

Private Attributes

std_cxx11::mutex mutex


class ConditionVariable

Detailed Description

Class implementing a Mutex. Mutexes are used to lock data structures to ensure that only a single thread of execution can access them at the same time.

Copy semantics

When copied, the receiving object does not receive any state from the object being copied, i.e. an entirely new mutex is created. This is consistent with expectations if a mutex is used as a member variable to lock the other member variables of a class: in that case, the mutex of the copied-to object should only guard the members of the copied-to object, not the members of both the copied-to and copied-from object.

Wolfgang Bangerth, 2002, 2003, 2009

Definition at line 247 of file thread_management.h.

Constructor & Destructor Documentation

Threads::Mutex::Mutex ( )

Default constructor.

Definition at line 294 of file thread_management.h.

Threads::Mutex::Mutex ( const Mutex )

Copy constructor. As discussed in this class's documentation, no state is copied from the object given as argument.

Definition at line 301 of file thread_management.h.

Member Function Documentation

void Threads::Mutex::acquire ( )

Acquire a mutex.

Definition at line 310 of file thread_management.h.

void Threads::Mutex::release ( )

Release the mutex again.

Definition at line 318 of file thread_management.h.

Friends And Related Function Documentation

friend class ConditionVariable

Make the class implementing condition variables a friend, since it needs to access the mutex.

Definition at line 333 of file thread_management.h.

Member Data Documentation

std_cxx11::mutex Threads::Mutex::mutex

Data object storing the mutex data

Definition at line 327 of file thread_management.h.

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