26#ifndef ROUTER_SRC_MYSQL_REST_SERVICE_SRC_HELPER_TASK_CONTROL_H_
27#define ROUTER_SRC_MYSQL_REST_SERVICE_SRC_HELPER_TASK_CONTROL_H_
47 template <
typename... Args>
68 bool was_running{
false};
72 log_debug(
"TaskControl::fetched = %i, was_running=%s", (
int)fetched,
73 (was_running ?
"yes" :
"no"));
76 log_debug(
"TaskControl::start - reset()");
82 log_debug(
"TaskControl::start - start()");
95 if (state_.exchange({k_stateInitialize, k_stateRunning, k_stateSuspended},
103 template <
typename StateType>
Definition: task_control.h:45
void task_resume()
Definition: task_control.h:57
void stop() override
Definition: task_control.h:94
TaskControl(Args &&...args)
Definition: task_control.h:48
void start() override
Definition: task_control.h:64
void task_suspend()
Definition: task_control.h:50
Definition: wait_variable.h:37
Log log_debug(std::cout, "DEBUG")
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:180
#define T
Definition: jit_executor_value.cc:373
Logging interface for using and extending the logging subsystem.
#define IMPORT_LOG_FUNCTIONS()
convenience macro to avoid common boilerplate
Definition: logging.h:331
static void stop(mysql_harness::PluginFuncEnv *)
Definition: mysql_rest_service_plugin.cc:413
std::string HARNESS_EXPORT reset()
get 'reset attributes' ESC sequence.
Definition: vt100.cc:37
State
Definition: task_control.h:37
@ k_stateInitialize
Definition: task_control.h:38
@ k_stateRunning
Definition: task_control.h:39
@ k_stateStopped
Definition: task_control.h:41
@ k_stateSuspended
Definition: task_control.h:40
Define std::hash<Gtid>.
Definition: gtid.h:355