30using Func_t = std::function<void(
void)>;
35 auto *func =
reinterpret_cast<Func_t *
>(arg);
45template <
class Callable,
class... Args>
52 std::bind(std::move(run_func), std::forward<Args>(args)...));
61template <
class Callable,
class... Args>
68 std::bind(std::move(run_func), std::forward<Args>(args)...));
int m_creation_error_code
Thread creation error code.
Definition: thread_srv.h:86
Thread_key m_thread_key
Thread key.
Definition: thread_srv.h:84
my_thread_handle m_thread_handle
Mysql thread handle.
Definition: thread_srv.h:80
my_thread_attr_t m_thread_attr
Thread attributes.
Definition: thread_srv.h:82
#define mysql_thread_create(K, P1, P2, P3, P4)
Instrumented my_thread_create.
Definition: mysql_thread.h:90
static int my_thread_attr_setdetachstate(my_thread_attr_t *attr, int detachstate)
Definition: my_thread.h:123
#define MY_THREAD_CREATE_JOINABLE
Definition: my_thread.h:70
bool my_thread_init()
Allocate thread specific memory for the thread, used by mysys and dbug.
Definition: my_thr_init.cc:264
void my_thread_end()
Deallocate memory used by the thread for book-keeping.
Definition: my_thr_init.cc:315
static int my_thread_attr_init(my_thread_attr_t *attr)
Definition: my_thread.h:91
Definition: packet_based_table_with_cursor.h:36
static void * launch_handler_thread(void *arg)
Function launching the thread function and matching interface of the my_start_routine.
Definition: thread_srv_impl.hpp:34
std::function< void(void)> Func_t
Definition: thread_srv_impl.hpp:30
Definition: cache_line_size.h:31
PSI_thread_key Thread_key
Definition: thread_srv.h:43
stdx::expected< void, error_type > bind(native_handle_type native_handle, const struct sockaddr *addr, size_t addr_len)
wrap bind() in a portable way.
Definition: socket.h:339