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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user