From 3013adb14f903d4562404a4f790c17cc0ff276ea Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Thu, 9 Aug 2018 14:59:48 +0300 Subject: [PATCH] MXS-2002 Worker::execute() renamed to Worker::call() In preparation for Worker::post() to be renamed to Worker:execute(). The concept of _posting_ will be reserved to mean the transfer of something over the message queue to the worker for processing and nothing else. --- include/maxscale/worker.hh | 2 +- server/core/worker.cc | 2 +- server/modules/monitor/mariadbmon/mariadbmon.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/maxscale/worker.hh b/include/maxscale/worker.hh index 67f2e9475..ab4bbb933 100644 --- a/include/maxscale/worker.hh +++ b/include/maxscale/worker.hh @@ -771,7 +771,7 @@ public: * * @return True if function was executed on the worker */ - bool execute(GenericFunction func, enum execute_mode_t mode); + bool call(GenericFunction func, enum execute_mode_t mode); /** * Post a message to a worker. diff --git a/server/core/worker.cc b/server/core/worker.cc index d62db4f3f..e9114a2db 100644 --- a/server/core/worker.cc +++ b/server/core/worker.cc @@ -516,7 +516,7 @@ bool Worker::post(GenericFunction func, Semaphore* pSem, execute_mode_t mode) return rval; } -bool Worker::execute(GenericFunction func, execute_mode_t mode) +bool Worker::call(GenericFunction func, execute_mode_t mode) { Semaphore sem; return post(func, &sem, mode) && sem.wait(); diff --git a/server/modules/monitor/mariadbmon/mariadbmon.cc b/server/modules/monitor/mariadbmon/mariadbmon.cc index 1c1867277..e902537ef 100644 --- a/server/modules/monitor/mariadbmon/mariadbmon.cc +++ b/server/modules/monitor/mariadbmon/mariadbmon.cc @@ -263,7 +263,7 @@ void MariaDBMonitor::diagnostics(DCB *dcb) const diag_str = diagnostics_to_string(); }; - if (!mutable_ptr->execute(func, Worker::EXECUTE_AUTO)) + if (!mutable_ptr->call(func, Worker::EXECUTE_AUTO)) { diag_str = DIAG_ERROR; } @@ -310,7 +310,7 @@ json_t* MariaDBMonitor::diagnostics_json() const rval = diagnostics_to_json(); }; - if (!mutable_ptr->execute(func, Worker::EXECUTE_AUTO)) + if (!mutable_ptr->call(func, Worker::EXECUTE_AUTO)) { rval = mxs_json_error_append(rval, "%s", DIAG_ERROR); }