Bitcoin
Public Member Functions | Private Attributes | List of all members
CThreadInterrupt Class Reference

#include <threadinterrupt.h>

Public Member Functions

 CThreadInterrupt ()
 
 operator bool () const
 
void operator() ()
 
void reset ()
 
bool sleep_for (std::chrono::milliseconds rel_time)
 
bool sleep_for (std::chrono::seconds rel_time)
 
bool sleep_for (std::chrono::minutes rel_time)
 

Private Attributes

std::condition_variable cond
 
Mutex mut
 
std::atomic< bool > flag
 

Constructor & Destructor Documentation

◆ CThreadInterrupt()

CThreadInterrupt::CThreadInterrupt ( )

Member Function Documentation

◆ operator bool()

CThreadInterrupt::operator bool ( ) const
explicit

◆ operator()()

void CThreadInterrupt::operator() ( )

◆ reset()

void CThreadInterrupt::reset ( )

◆ sleep_for() [1/3]

bool CThreadInterrupt::sleep_for ( std::chrono::milliseconds  rel_time)

◆ sleep_for() [2/3]

bool CThreadInterrupt::sleep_for ( std::chrono::seconds  rel_time)

◆ sleep_for() [3/3]

bool CThreadInterrupt::sleep_for ( std::chrono::minutes  rel_time)

Member Data Documentation

◆ cond

std::condition_variable CThreadInterrupt::cond
private

◆ flag

std::atomic<bool> CThreadInterrupt::flag
private

◆ mut

Mutex CThreadInterrupt::mut
private

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