Deduplicate DbConnection#m_QueryQueue.Join() in #Pause()

refs #8727
This commit is contained in:
Alexander A. Klimov 2021-04-20 18:31:02 +02:00
parent 40c0bfad23
commit fd9bdb798d
3 changed files with 3 additions and 6 deletions

View File

@ -112,6 +112,9 @@ void DbConnection::Pause()
NewTransaction();
/* Work on remaining tasks but never delete the threads, for HA resuming later. */
m_QueryQueue.Join();
ConfigObject::Pause();
}

View File

@ -107,9 +107,6 @@ void IdoMysqlConnection::Pause()
m_QueryQueue.Enqueue([this]() { Disconnect(); }, PriorityLow);
/* Work on remaining tasks but never delete the threads, for HA resuming later. */
m_QueryQueue.Join();
Log(LogInformation, "IdoMysqlConnection")
<< "'" << GetName() << "' paused.";

View File

@ -106,9 +106,6 @@ void IdoPgsqlConnection::Pause()
m_QueryQueue.Enqueue([this]() { Disconnect(); }, PriorityLow);
/* Work on remaining tasks but never delete the threads, for HA resuming later. */
m_QueryQueue.Join();
Log(LogInformation, "IdoPgsqlConnection")
<< "'" << GetName() << "' paused.";
}