![]() |
MySQL 26.7.0
Source Code Documentation
|
Wrapper to mysql thread, which matches interface of std::thread. More...
#include <thread_srv.h>
Public Member Functions | |
| Thread ()=default | |
| Thread (const Thread &)=delete | |
| Thread & | operator= (const Thread &src)=delete |
| Thread (Thread &&)=default | |
| Thread & | operator= (Thread &&)=default |
| template<class Callable , class... Args> | |
| Thread (Thread_key thread_key, Callable &&run_func, Args &&...args) | |
| Creates a thread, runs thread function. More... | |
| template<class Callable , class... Args> | |
| Thread (Callable &&run_func, Args &&...args) | |
| Creates a thread, runs thread function. More... | |
| void | join () |
| Joins thread. More... | |
| bool | joinable () const |
| Checks whether a thread was created successfully. More... | |
| int | creation_error_code () const |
| Returns the thread creation error code. More... | |
Private Attributes | |
| my_thread_handle | m_thread_handle |
| Mysql thread handle. More... | |
| my_thread_attr_t | m_thread_attr |
| Thread attributes. More... | |
| Thread_key | m_thread_key {0} |
| Thread key. More... | |
| int | m_creation_error_code {0} |
| Thread creation error code. More... | |
Wrapper to mysql thread, which matches interface of std::thread.
|
default |
|
delete |
|
default |
| mysql::concurrency::Thread::Thread | ( | Thread_key | thread_key, |
| Callable && | run_func, | ||
| Args &&... | args | ||
| ) |
Creates a thread, runs thread function.
| thread_key | PSI thread key |
| run_func | Function called asynchronously in a separate thread |
| args | Function arguments |
| mysql::concurrency::Thread::Thread | ( | Callable && | run_func, |
| Args &&... | args | ||
| ) |
Creates a thread, runs thread function.
| run_func | Function called asynchronously in a separate thread |
| args | Function arguments |
|
inline |
Returns the thread creation error code.
|
inline |
Joins thread.
|
inline |
Checks whether a thread was created successfully.
|
private |
Thread creation error code.
|
private |
Thread attributes.
|
private |
Mysql thread handle.
|
private |
Thread key.