1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-23 06:52:28 +03:00

No boost condition (#2822)

This patch replaces boost primitives with stdlib counterparts.
This commit is contained in:
Leonid Fedorov
2023-04-22 00:42:45 +03:00
committed by GitHub
parent 3ce19abdae
commit f916e64927
245 changed files with 1261 additions and 2007 deletions

View File

@@ -19,7 +19,8 @@
//
/** @file */
#include <boost/thread/mutex.hpp>
#include <map>
#include <mutex>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
using namespace boost;
@@ -45,9 +46,9 @@ using namespace logging;
#include "dbrm.h"
using namespace BRM;
using namespace messageqcpp;
boost::mutex mute;
boost::condition_variable cond;
boost::mutex fLock;
std::mutex mute;
std::condition_variable cond;
std::mutex fLock;
namespace dmlprocessor
{
@@ -177,7 +178,7 @@ uint64_t BatchInsertProc::grabTableLock(int32_t sessionId)
BatchInsertProc::SP_PKG BatchInsertProc::getInsertQueue()
{
boost::mutex::scoped_lock lk(fLock);
std::unique_lock lk(fLock);
return fInsertPkgQueue;
}
@@ -187,14 +188,14 @@ void BatchInsertProc::setLastPkg(bool lastPkg)
}
void BatchInsertProc::addPkg(messageqcpp::ByteStream& insertBs)
{
boost::mutex::scoped_lock lk(fLock);
std::unique_lock lk(fLock);
fInsertPkgQueue->push(insertBs);
}
messageqcpp::ByteStream BatchInsertProc::getPkg()
{
messageqcpp::ByteStream bs;
boost::mutex::scoped_lock lk(fLock);
std::unique_lock lk(fLock);
bs = fInsertPkgQueue->front();
fInsertPkgQueue->pop();
return bs;
@@ -532,13 +533,13 @@ void BatchInsertProc::setHwm()
void BatchInsertProc::setError(int errorCode, std::string errMsg)
{
boost::mutex::scoped_lock lk(fLock);
std::unique_lock lk(fLock);
fErrorCode = errorCode;
fErrMsg = errMsg;
}
void BatchInsertProc::getError(int& errorCode, std::string& errMsg)
{
boost::mutex::scoped_lock lk(fLock);
std::unique_lock lk(fLock);
errorCode = fErrorCode;
errMsg = fErrMsg;
}