Reference documentation for deal.II version 9.0.0
|
#include <deal.II/base/thread_management.h>
Classes | |
class | ScopedLock |
Public Member Functions | |
Mutex ()=default | |
Mutex (const Mutex &) | |
Mutex & | operator= (const Mutex &) |
void | acquire () |
void | release () |
Private Attributes | |
std::mutex | mutex |
Friends | |
class | ConditionVariable |
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.
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.
Definition at line 249 of file thread_management.h.
|
default |
Default constructor.
|
inline |
Copy constructor. As discussed in this class's documentation, no state is copied from the object given as argument.
Definition at line 302 of file thread_management.h.
Copy operators. As discussed in this class's documentation, no state is copied from the object given as argument.
Definition at line 312 of file thread_management.h.
|
inline |
Acquire a mutex.
Definition at line 321 of file thread_management.h.
|
inline |
Release the mutex again.
Definition at line 329 of file thread_management.h.
|
friend |
Make the class implementing condition variables a friend, since it needs to access the mutex.
Definition at line 344 of file thread_management.h.
|
private |
Data object storing the mutex data
Definition at line 338 of file thread_management.h.