26#ifndef MYSQL_HARNESS_MYSQL_ROUTER_THREAD_INCLUDED
27#define MYSQL_HARNESS_MYSQL_ROUTER_THREAD_INCLUDED
29#include "harness_export.h"
31#ifndef MYSQL_ABI_CHECK
48typedef struct thread_attr {
65#define MYSQL_ROUTER_THREAD_CREATE_JOINABLE 0
66#define MYSQL_ROUTER_THREAD_CREATE_DETACHED 1
69#define MYSQL_ROUTER_THREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
70#define MYSQL_ROUTER_THREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
71typedef void *(*my_start_routine)(
void *);
127 bool should_join_ =
false;
MySQLRouterThread provides higher level interface to managing threads.
Definition: mysql_router_thread.h:77
mysql_harness::mysql_router_thread_handle thread_handle_
handle to the thread
Definition: mysql_router_thread.h:120
MySQLRouterThread(const MySQLRouterThread &)=delete
void *(void *) thread_function
Definition: mysql_router_thread.h:79
mysql_harness::mysql_router_thread_attr_t thread_attr_
attribute of thread
Definition: mysql_router_thread.h:123
MySQLRouterThread & operator=(const MySQLRouterThread &)=delete
static void run(mysql_harness::PluginFuncEnv *)
Definition: io_plugin.cc:195
pthread_t mysql_router_thread_t
Definition: mysql_router_thread.h:53
static const size_t kDefaultStackSizeInKiloBytes
Definition: mysql_router_thread.h:44
pthread_attr_t mysql_router_thread_attr_t
Definition: mysql_router_thread.h:54
std::string join(Container cont, const std::string &delim)
join elements of an container into a string separated by a delimiter.
Definition: string.h:151
void *(* my_start_routine)(void *)
Definition: mysql_router_thread.h:71
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:64
Definition: mysql_router_thread.h:57
mysql_router_thread_t thread
Definition: mysql_router_thread.h:58
#define HANDLE
Definition: violite.h:159