25#ifndef MYSQL_HARNESS_MYSQL_ROUTER_THREAD_INCLUDED
26#define MYSQL_HARNESS_MYSQL_ROUTER_THREAD_INCLUDED
28#include "harness_export.h"
30#ifndef MYSQL_ABI_CHECK
47typedef struct thread_attr {
64#define MYSQL_ROUTER_THREAD_CREATE_JOINABLE 0
65#define MYSQL_ROUTER_THREAD_CREATE_DETACHED 1
68#define MYSQL_ROUTER_THREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
69#define MYSQL_ROUTER_THREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
70typedef void *(*my_start_routine)(
void *);
126 bool should_join_ =
false;
MySQLRouterThread provides higher level interface to managing threads.
Definition: mysql_router_thread.h:76
mysql_harness::mysql_router_thread_handle thread_handle_
handle to the thread
Definition: mysql_router_thread.h:119
MySQLRouterThread(const MySQLRouterThread &)=delete
void *(void *) thread_function
Definition: mysql_router_thread.h:78
mysql_harness::mysql_router_thread_attr_t thread_attr_
attribute of thread
Definition: mysql_router_thread.h:122
MySQLRouterThread & operator=(const MySQLRouterThread &)=delete
static void run(mysql_harness::PluginFuncEnv *)
Definition: io_plugin.cc:194
pthread_t mysql_router_thread_t
Definition: mysql_router_thread.h:52
static const size_t kDefaultStackSizeInKiloBytes
Definition: mysql_router_thread.h:43
pthread_attr_t mysql_router_thread_attr_t
Definition: mysql_router_thread.h:53
std::string join(Container cont, const std::string &delim)
join elements of an container into a string separated by a delimiter.
Definition: string.h:150
void *(* my_start_routine)(void *)
Definition: mysql_router_thread.h:70
static int handle(int sql_errno, const char *sqlstate, const char *message, void *state)
Bridge function between the C++ API offered by this module and the C API of the parser service.
Definition: services.cc:63
Definition: mysql_router_thread.h:56
mysql_router_thread_t thread
Definition: mysql_router_thread.h:57
#define HANDLE
Definition: violite.h:158