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 {
68#define MYSQL_ROUTER_THREAD_CREATE_JOINABLE 0
69#define MYSQL_ROUTER_THREAD_CREATE_DETACHED 1
72#define MYSQL_ROUTER_THREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
73#define MYSQL_ROUTER_THREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
74typedef void *(*my_start_routine)(
void *);
130 bool should_join_ =
false;
MySQLRouterThread provides higher level interface to managing threads.
Definition: mysql_router_thread.h:80
mysql_harness::mysql_router_thread_handle thread_handle_
handle to the thread
Definition: mysql_router_thread.h:123
MySQLRouterThread(const MySQLRouterThread &)=delete
void *(void *) thread_function
Definition: mysql_router_thread.h:82
mysql_harness::mysql_router_thread_attr_t thread_attr_
attribute of thread
Definition: mysql_router_thread.h:126
MySQLRouterThread & operator=(const MySQLRouterThread &)=delete
static void run(mysql_harness::PluginFuncEnv *)
Definition: io_plugin.cc:197
pthread_t mysql_router_thread_t
Definition: mysql_router_thread.h:53
static constexpr mysql_router_thread_t null_thread_initializer
Definition: mysql_router_thread.h:57
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:74
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:60
mysql_router_thread_t thread
Definition: mysql_router_thread.h:61
#define HANDLE
Definition: violite.h:159