MXS-2004 Remove dependency of maxscale/thread.h
This commit is contained in:
parent
e978387775
commit
b408894f6d
@ -28,7 +28,6 @@
|
||||
|
||||
#include <maxscale/atomic.h>
|
||||
#include <maxscale/debug.h>
|
||||
#include <maxscale/thread.h>
|
||||
#include <maxscale/utils.h>
|
||||
#include <maxscale/config.h>
|
||||
#include <maxscale/clock.h>
|
||||
|
@ -19,12 +19,12 @@
|
||||
#include <sys/wait.h>
|
||||
#include <fcntl.h>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#include <maxscale/alloc.h>
|
||||
#include <maxscale/debug.h>
|
||||
#include <maxscale/log_manager.h>
|
||||
#include <maxscale/pcre2.h>
|
||||
#include <maxscale/thread.h>
|
||||
|
||||
/**
|
||||
* Tokenize a string into arguments suitable for a `execvp` call
|
||||
@ -303,7 +303,7 @@ int externcmd_execute(EXTERNCMD* cmd)
|
||||
else
|
||||
{
|
||||
// Sleep and try again
|
||||
thread_millisleep(1);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -75,7 +75,6 @@
|
||||
#include <maxscale/log_manager.h>
|
||||
#include <maxscale/protocol/mysql.h>
|
||||
#include <maxscale/platform.h>
|
||||
#include <maxscale/thread.h>
|
||||
#include <maxscale/pcre2.h>
|
||||
#include <maxscale/alloc.h>
|
||||
#include <maxscale/spinlock.hh>
|
||||
|
@ -17,8 +17,8 @@
|
||||
#include <inttypes.h>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
#include <maxscale/mysql_utils.h>
|
||||
#include <maxscale/thread.h>
|
||||
#include <maxscale/utils.hh>
|
||||
|
||||
using std::string;
|
||||
@ -410,7 +410,7 @@ bool MariaDBServer::wait_until_gtid(const GtidList& target, int timeout, json_t*
|
||||
if (seconds_remaining > 0)
|
||||
{
|
||||
// Sleep for a moment, then try again.
|
||||
thread_millisleep(sleep_ms);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(sleep_ms));
|
||||
sleep_ms += 100; // Sleep a bit more next iteration.
|
||||
}
|
||||
}
|
||||
@ -679,7 +679,8 @@ bool MariaDBServer::failover_wait_relay_log(int seconds_remaining, json_t** err_
|
||||
{
|
||||
MXS_INFO("Relay log of server '%s' not yet empty, waiting to clear %" PRId64 " events.",
|
||||
name(), relay_log_events());
|
||||
thread_millisleep(1000); // Sleep for a while before querying server again.
|
||||
// Sleep for a while before querying server again.
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
// TODO: check server version before entering failover.
|
||||
// TODO: fix for multisource
|
||||
GtidList old_gtid_io_pos = m_slave_status[0].gtid_io_pos;
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include <maxscale/service.h>
|
||||
#include <maxscale/session.h>
|
||||
#include <maxscale/spinlock.h>
|
||||
#include <maxscale/thread.h>
|
||||
#include <maxscale/utils.h>
|
||||
|
||||
static GWBUF *blr_make_query(DCB *dcb, char *query);
|
||||
|
Loading…
x
Reference in New Issue
Block a user