Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

CThreadInterrupt Class Reference

#include <threadinterrupt.h>

Public Member Functions

 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
 
std::mutex mut
 
std::atomic< bool > flag
 

Detailed Description

Definition at line 18 of file threadinterrupt.h.

Member Function Documentation

◆ operator bool()

CThreadInterrupt::operator bool ( ) const
explicit

Definition at line 8 of file threadinterrupt.cpp.

◆ operator()()

void CThreadInterrupt::operator() ( )

Definition at line 18 of file threadinterrupt.cpp.

References cond, flag, and mut.

◆ reset()

void CThreadInterrupt::reset ( )

◆ sleep_for() [1/3]

◆ sleep_for() [2/3]

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

Definition at line 33 of file threadinterrupt.cpp.

References sleep_for().

◆ sleep_for() [3/3]

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

Definition at line 38 of file threadinterrupt.cpp.

References sleep_for().

Member Data Documentation

◆ cond

std::condition_variable CThreadInterrupt::cond
private

Definition at line 29 of file threadinterrupt.h.

Referenced by operator()(), and sleep_for().

◆ flag

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

Definition at line 31 of file threadinterrupt.h.

Referenced by operator()(), reset(), and sleep_for().

◆ mut

std::mutex CThreadInterrupt::mut
private

Definition at line 30 of file threadinterrupt.h.

Referenced by operator()(), and sleep_for().


The documentation for this class was generated from the following files:
Released under the MIT license