MySQL 8.4.2
Source Code Documentation
My_xp_thread Class Referenceabstract

Abstract class used to wrap mutex for various platforms. More...

#include <my_xp_thread.h>

Inheritance diagram for My_xp_thread:
[legend]

Public Member Functions

virtual int create (PSI_thread_key key, const native_thread_attr_t *attr, native_start_routine func, void *arg)=0
 Creates thread. More...
 
virtual int create_detached (PSI_thread_key key, native_thread_attr_t *attr, native_start_routine func, void *arg)=0
 Creates a detached thread. More...
 
virtual int join (void **value_ptr)=0
 Suspend invoking thread until this thread terminates. More...
 
virtual int cancel ()=0
 Cancel this thread. More...
 
virtual native_thread_tget_native_thread ()=0
 Retrieves native thread reference. More...
 
virtual ~My_xp_thread ()=default
 

Detailed Description

Abstract class used to wrap mutex for various platforms.

A typical use case is:

thread->create(key, NULL, &function, &args);
void *result;
thread->join(&result);
Definition: my_xp_thread.h:139
Abstract class used to wrap mutex for various platforms.
Definition: my_xp_thread.h:61
virtual int create(PSI_thread_key key, const native_thread_attr_t *attr, native_start_routine func, void *arg)=0
Creates thread.
virtual int join(void **value_ptr)=0
Suspend invoking thread until this thread terminates.
struct result result
Definition: result.h:34
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Definition: result.h:30
#define NULL
Definition: types.h:55

Constructor & Destructor Documentation

◆ ~My_xp_thread()

virtual My_xp_thread::~My_xp_thread ( )
virtualdefault

Member Function Documentation

◆ cancel()

virtual int My_xp_thread::cancel ( )
pure virtual

Cancel this thread.

Returns
success status

Implemented in My_xp_thread_server.

◆ create()

virtual int My_xp_thread::create ( PSI_thread_key  key,
const native_thread_attr_t attr,
native_start_routine  func,
void *  arg 
)
pure virtual

Creates thread.

Parameters
keythread instrumentation key
attrthread attributes
funcroutine function
argfunction parameters
Returns
success status

Implemented in My_xp_thread_server.

◆ create_detached()

virtual int My_xp_thread::create_detached ( PSI_thread_key  key,
native_thread_attr_t attr,
native_start_routine  func,
void *  arg 
)
pure virtual

Creates a detached thread.

Parameters
keythread instrumentation key
attrthread attributes
funcroutine function
argfunction parameters
Returns
success status

Implemented in My_xp_thread_server.

◆ get_native_thread()

virtual native_thread_t * My_xp_thread::get_native_thread ( )
pure virtual

Retrieves native thread reference.

Returns
native thread pointer

Implemented in My_xp_thread_server.

◆ join()

virtual int My_xp_thread::join ( void **  value_ptr)
pure virtual

Suspend invoking thread until this thread terminates.

Parameters
value_ptrpointer for a placeholder for the terminating thread status
Returns
success status

Implemented in My_xp_thread_server.


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