Electroneum
epee::simple_event Struct Reference

#include <syncobj.h>

Public Member Functions

 simple_event ()
 
void raise ()
 
void wait ()
 

Detailed Description

Definition at line 52 of file syncobj.h.

Constructor & Destructor Documentation

◆ simple_event()

epee::simple_event::simple_event ( )
inline

Definition at line 54 of file syncobj.h.

54  : m_rised(false)
55  {
56  }

Member Function Documentation

◆ raise()

void epee::simple_event::raise ( )
inline

Definition at line 58 of file syncobj.h.

59  {
60  boost::unique_lock<boost::mutex> lock(m_mx);
61  m_rised = true;
62  m_cond_var.notify_one();
63  }

◆ wait()

void epee::simple_event::wait ( )
inline

Definition at line 65 of file syncobj.h.

66  {
67  boost::unique_lock<boost::mutex> lock(m_mx);
68  while (!m_rised)
69  m_cond_var.wait(lock);
70  m_rised = false;
71  }

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