MXS-2002 Make Worker excecution mode explicit

This is the first step in some cleanup of the Worker interface.
The execution mode must now be explicitly specified, but that is
just a temporary step. Further down the road, _posting_ will
*always* mean via the message loop while _executing_ will optionally
and by default mean direct execution if the calling thread is that
of the worker.
This commit is contained in:
Johan Wikman
2018-08-09 10:58:28 +03:00
parent b9ec3f5130
commit 9cfd451a1d
8 changed files with 56 additions and 25 deletions

View File

@ -263,7 +263,7 @@ void MariaDBMonitor::diagnostics(DCB *dcb) const
diag_str = diagnostics_to_string();
};
if (!mutable_ptr->execute(func))
if (!mutable_ptr->execute(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))
if (!mutable_ptr->execute(func, Worker::EXECUTE_AUTO))
{
rval = mxs_json_error_append(rval, "%s", DIAG_ERROR);
}