Electroneum
Loading...
Searching...
No Matches
epee::critical_region_t< t_lock > Class Template Reference

#include <syncobj.h>

Public Member Functions

 critical_region_t (t_lock &cs)
 ~critical_region_t ()
void unlock ()

Detailed Description

template<class t_lock>
class epee::critical_region_t< t_lock >

Definition at line 124 of file syncobj.h.

Constructor & Destructor Documentation

◆ critical_region_t()

template<class t_lock>
epee::critical_region_t< t_lock >::critical_region_t ( t_lock & cs)
inline

Definition at line 132 of file syncobj.h.

132 : m_locker(cs), m_unlocked(false)
133 {
134 m_locker.lock();
135 }

◆ ~critical_region_t()

template<class t_lock>
epee::critical_region_t< t_lock >::~critical_region_t ( )
inline

Definition at line 137 of file syncobj.h.

138 {
139 unlock();
140 }
Here is the call graph for this function:

Member Function Documentation

◆ unlock()

template<class t_lock>
void epee::critical_region_t< t_lock >::unlock ( )
inline

Definition at line 142 of file syncobj.h.

143 {
144 if (!m_unlocked)
145 {
146 m_locker.unlock();
147 m_unlocked = true;
148 }
149 }
Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/contrib/epee/include/syncobj.h