DASH
0.3.0
|
Behaves similar to std::mutex
and is used to ensure mutual exclusion within a dash team.
More...
#include <Mutex.h>
Public Member Functions | |
Mutex (Team &team=dash::Team::All()) | |
DASH Mutex is only valid for a dash team. More... | |
Mutex (const Mutex &other)=delete | |
Mutex (Mutex &&other)=default | |
self_t & | operator= (const self_t &other)=delete |
self_t & | operator= (self_t &&other)=default |
~Mutex ()=default | |
Collective destructor to destruct a DART lock. More... | |
bool | init () |
Collective initialization of the DART lock. More... | |
void | lock () |
Block until the lock was acquired. More... | |
bool | try_lock () |
Try to acquire the lock and return immediately. More... | |
void | unlock () |
Release the lock acquired through lock() or try_lock() . More... | |
Behaves similar to std::mutex
and is used to ensure mutual exclusion within a dash team.
std::lock_guard
|
explicit |
DASH Mutex is only valid for a dash team.
If no team is passed, team all is used.
This function is not thread-safe
team | team for mutual exclusive accesses |
|
default |
Collective destructor to destruct a DART lock.
This function is not thread-safe
bool dash::Mutex::init | ( | ) |
Collective initialization of the DART lock.
This function is not thread-safe
void dash::Mutex::lock | ( | ) |
Block until the lock was acquired.
bool dash::Mutex::try_lock | ( | ) |
Try to acquire the lock and return immediately.
void dash::Mutex::unlock | ( | ) |
Release the lock acquired through lock()
or try_lock()
.