KASKADE 7 development version
|
Grid locking information based on grid type. More...
#include <gridBasics.hh>
Grid locking information based on grid type.
Some Dune grids appear not to be thread-safe even for read operations. Based on the grid type, we provide this information and provide a mutex which can be used to lock individual calls to the grid interface.
Definition at line 83 of file gridBasics.hh.
Public Member Functions | |
void | lock () |
bool | try_lock () |
void | unlock () |
Static Public Member Functions | |
static GridLocking< Grid > & | mutex () |
Returns a globally unique lockable object that shall be used for locking access to operations on the grid. More... | |
|
inline |
Definition at line 100 of file gridBasics.hh.
|
inlinestatic |
Returns a globally unique lockable object that shall be used for locking access to operations on the grid.
For grids which are (supposed to be) thread-safe, this returns a dummy lockable, which does exactly nothing (as it should be). For non-safe grids this returns a recursive mutex. Thus, the grid access can be made mutually exclusive without caring whether a calling routine has already acquired the mutex.
Definition at line 94 of file gridBasics.hh.
|
inline |
Definition at line 103 of file gridBasics.hh.
|
inline |
Definition at line 108 of file gridBasics.hh.