Bitcoin Core  24.99.0
P2P Digital Currency
Public Types | Public Member Functions | Private Attributes | List of all members
CThreadInterrupt Class Reference

#include <threadinterrupt.h>

Collaboration diagram for CThreadInterrupt:

Public Types

using Clock = std::chrono::steady_clock

Public Member Functions

 CThreadInterrupt ()
 operator bool () const
void operator() () EXCLUSIVE_LOCKS_REQUIRED(!mut)
void reset ()
bool sleep_for (Clock::duration rel_time) EXCLUSIVE_LOCKS_REQUIRED(!mut)

Private Attributes

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

Detailed Description

Definition at line 20 of file threadinterrupt.h.

Member Typedef Documentation

◆ Clock

using CThreadInterrupt::Clock = std::chrono::steady_clock

Definition at line 23 of file threadinterrupt.h.

Constructor & Destructor Documentation

◆ CThreadInterrupt()

CThreadInterrupt::CThreadInterrupt ( )

Definition at line 10 of file threadinterrupt.cpp.

Member Function Documentation

◆ operator bool()

CThreadInterrupt::operator bool ( ) const

Definition at line 12 of file threadinterrupt.cpp.

◆ operator()()

void CThreadInterrupt::operator() ( )

Definition at line 22 of file threadinterrupt.cpp.

◆ reset()

void CThreadInterrupt::reset ( )

Definition at line 17 of file threadinterrupt.cpp.

Here is the caller graph for this function:

◆ sleep_for()

bool CThreadInterrupt::sleep_for ( Clock::duration  rel_time)

Definition at line 31 of file threadinterrupt.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ cond

std::condition_variable CThreadInterrupt::cond

Definition at line 31 of file threadinterrupt.h.

◆ flag

std::atomic<bool> CThreadInterrupt::flag

Definition at line 33 of file threadinterrupt.h.

◆ mut

Mutex CThreadInterrupt::mut

Definition at line 32 of file threadinterrupt.h.

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