libMesh::Threads::BoolAcquire Class Reference

#include <threads.h>

Public Member Functions

 BoolAcquire (bool &b)
 ~BoolAcquire ()

Private Attributes

bool & _b

Detailed Description

We use a class to turn Threads::in_threads on and off, to be exception-safe.

Definition at line 53 of file threads.h.

Constructor & Destructor Documentation

◆ BoolAcquire()

libMesh::Threads::BoolAcquire::BoolAcquire ( bool &  b)

Definition at line 57 of file threads.h.

References _b.

57 : _b(b) { libmesh_assert(!_b); _b = true; }

◆ ~BoolAcquire()

libMesh::Threads::BoolAcquire::~BoolAcquire ( )

Definition at line 59 of file threads.h.

References _b.

59 { libmesh_exceptionless_assert(_b); _b = false; }

Member Data Documentation

◆ _b

bool& libMesh::Threads::BoolAcquire::_b

Definition at line 61 of file threads.h.

Referenced by BoolAcquire(), and ~BoolAcquire().

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