MXS-2002 Add additional versions of Worker::[call|execute]()

This commit is contained in:
Johan Wikman
2018-08-09 15:21:01 +03:00
parent e9758ebaf1
commit 4193c4d3db
3 changed files with 25 additions and 3 deletions

View File

@ -516,6 +516,12 @@ bool Worker::execute(GenericFunction func, Semaphore* pSem, execute_mode_t mode)
return rval;
}
bool Worker::call(Task& task, execute_mode_t mode)
{
Semaphore sem;
return execute(&task, &sem, mode) && sem.wait();
}
bool Worker::call(GenericFunction func, execute_mode_t mode)
{
Semaphore sem;

View File

@ -972,7 +972,7 @@ void MariaDBMonitor::disable_setting(const std::string& setting)
p.name = const_cast<char*>(setting.c_str());
p.value = const_cast<char*>("false");
monitor_add_parameters(m_monitor, &p);
}, NULL, EXECUTE_AUTO);
}, EXECUTE_AUTO);
}
/**