MySQL 8.0.40
Source Code Documentation
Interruptible_wait Class Reference

Enables a session to wait on a condition until a timeout or a network disconnect occurs. More...

Public Member Functions

 Interruptible_wait (THD *thd)
 
 ~Interruptible_wait ()=default
 
void set_timeout (ulonglong timeout)
 Set the absolute timeout. More...
 
int wait (mysql_cond_t *, mysql_mutex_t *)
 The timed wait. More...
 

Private Attributes

THDm_thd
 
struct timespec m_abs_timeout
 

Static Private Attributes

static const ulonglong m_interrupt_interval = 5 * 1000000000ULL
 Time to wait before polling the connection status. More...
 

Detailed Description

Enables a session to wait on a condition until a timeout or a network disconnect occurs.

Remarks
The connection is polled every m_interrupt_interval nanoseconds.

Constructor & Destructor Documentation

◆ Interruptible_wait()

Interruptible_wait::Interruptible_wait ( THD thd)
inline

◆ ~Interruptible_wait()

Interruptible_wait::~Interruptible_wait ( )
default

Member Function Documentation

◆ set_timeout()

void Interruptible_wait::set_timeout ( ulonglong  timeout)
inline

Set the absolute timeout.

Parameters
timeoutThe amount of time in nanoseconds to wait

◆ wait()

int Interruptible_wait::wait ( mysql_cond_t cond,
mysql_mutex_t mutex 
)

The timed wait.

Wait for a given condition to be signaled.

Parameters
condThe condition variable to wait on.
mutexThe associated mutex.
Remarks
The absolute timeout is preserved across calls.
Return values
returnvalue from mysql_cond_timedwait

Member Data Documentation

◆ m_abs_timeout

struct timespec Interruptible_wait::m_abs_timeout
private

◆ m_interrupt_interval

const ulonglong Interruptible_wait::m_interrupt_interval = 5 * 1000000000ULL
staticprivate

Time to wait before polling the connection status.

◆ m_thd

THD* Interruptible_wait::m_thd
private

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