You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
No boost condition (#2822)
This patch replaces boost primitives with stdlib counterparts.
This commit is contained in:
@ -224,7 +224,7 @@ DistributedEngineComm::~DistributedEngineComm()
|
||||
int32_t DistributedEngineComm::Setup()
|
||||
{
|
||||
// This is here to ensure that this function does not get invoked multiple times simultaneously.
|
||||
boost::mutex::scoped_lock setupLock(fSetupMutex);
|
||||
std::unique_lock setupLock(fSetupMutex);
|
||||
|
||||
makeBusy(true);
|
||||
|
||||
@ -329,7 +329,7 @@ int32_t DistributedEngineComm::Setup()
|
||||
// for every entry in newClients up to newPmCount, scan for the same ip in the
|
||||
// first pmCount. If there is no match, it's a new node,
|
||||
// call the event listeners' newPMOnline() callbacks.
|
||||
boost::mutex::scoped_lock lock(eventListenerLock);
|
||||
std::unique_lock lock(eventListenerLock);
|
||||
|
||||
for (uint32_t i = 0; i < newPmCount; i++)
|
||||
{
|
||||
@ -437,7 +437,7 @@ Error:
|
||||
/*
|
||||
// reset the pmconnection vector
|
||||
ClientList tempConns;
|
||||
boost::mutex::scoped_lock onErrLock(fOnErrMutex);
|
||||
std::unique_lock onErrLock(fOnErrMutex);
|
||||
string moduleName = client->moduleName();
|
||||
//cout << "moduleName=" << moduleName << endl;
|
||||
for ( uint32_t i = 0; i < fPmConnections.size(); i++)
|
||||
@ -468,8 +468,9 @@ void DistributedEngineComm::addQueue(uint32_t key, bool sendACKs)
|
||||
{
|
||||
bool b;
|
||||
|
||||
boost::mutex* lock = new boost::mutex();
|
||||
condition* cond = new condition();
|
||||
std::mutex* lock = new std::mutex();
|
||||
std::condition_variable* cond = new std::condition_variable();
|
||||
|
||||
uint32_t firstPMInterleavedConnectionId =
|
||||
key % (fPmConnections.size() / pmCount) * fDECConnectionsPerQuery * pmCount % fPmConnections.size();
|
||||
boost::shared_ptr<MQE> mqe(new MQE(pmCount, firstPMInterleavedConnectionId));
|
||||
@ -1194,7 +1195,7 @@ int DistributedEngineComm::writeToClient(size_t aPMIndex, const SBS& bs, uint32_
|
||||
ClientList tempConns;
|
||||
{
|
||||
//cout << "WARNING: DEC WRITE BROKEN PIPE " <<
|
||||
fPmConnections[index]->otherEnd()<< endl; boost::mutex::scoped_lock onErrLock(fOnErrMutex); string
|
||||
fPmConnections[index]->otherEnd()<< endl; std::unique_lock onErrLock(fOnErrMutex); string
|
||||
moduleName = fPmConnections[index]->moduleName();
|
||||
//cout << "module name = " << moduleName << endl;
|
||||
if (index >= fPmConnections.size()) return 0;
|
||||
@ -1240,13 +1241,13 @@ uint32_t DistributedEngineComm::size(uint32_t key)
|
||||
|
||||
void DistributedEngineComm::addDECEventListener(DECEventListener* l)
|
||||
{
|
||||
boost::mutex::scoped_lock lk(eventListenerLock);
|
||||
std::unique_lock lk(eventListenerLock);
|
||||
eventListeners.push_back(l);
|
||||
}
|
||||
|
||||
void DistributedEngineComm::removeDECEventListener(DECEventListener* l)
|
||||
{
|
||||
boost::mutex::scoped_lock lk(eventListenerLock);
|
||||
std::unique_lock lk(eventListenerLock);
|
||||
std::vector<DECEventListener*> newListeners;
|
||||
uint32_t s = eventListeners.size();
|
||||
|
||||
|
Reference in New Issue
Block a user