MySQL 9.1.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
os0thread.cc File Reference

The interface to the operating system thread control primitives. More...

#include "univ.i"
#include <atomic>
#include <ios>
#include <sstream>
#include <thread>
#include "ut0ut.h"

Functions

std::string to_string (std::thread::id thread_id, bool hex_value)
 Returns the string representation of the thread ID supplied. More...
 

Variables

uint32_t srv_max_n_threads = 0
 We are prepared for a situation that we have this many threads waiting for a semaphore inside InnoDB. More...
 
std::atomic_int os_thread_count
 Number of threads active. More...
 

Detailed Description

The interface to the operating system thread control primitives.

Created 9/8/1995 Heikki Tuuri

Function Documentation

◆ to_string()

std::string to_string ( std::thread::id  thread_id,
bool  hex_value = false 
)

Returns the string representation of the thread ID supplied.

It uses the only standard-compliant way of printing the thread ID.

Parameters
thread_idThe thread ID to convert to string.
hex_valueIf true, the conversion will be asked to output in hexadecimal format. The support for it is OS-implementation-dependent and may be ignored.

Variable Documentation

◆ os_thread_count

std::atomic_int os_thread_count

Number of threads active.

◆ srv_max_n_threads

uint32_t srv_max_n_threads = 0

We are prepared for a situation that we have this many threads waiting for a semaphore inside InnoDB.

Maximum number of threads inside InnoDB.

innodb_init_params() sets the value.