1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

Merge branch 'develop-1.1' into 1.1-merge-up-20180817

This commit is contained in:
Andrew Hutchings
2018-08-17 16:17:13 +01:00
47 changed files with 1526 additions and 756 deletions

View File

@@ -398,20 +398,29 @@ void FIFO<element_t>::signalPs()
template<typename element_t>
inline bool FIFO<element_t>::next(uint64_t id, element_t* out)
{
base::mutex.lock();
fConsumptionStarted = true;
if (cpos[id] >= fMaxElements)
{
base::mutex.unlock();
if (!waitForSwap(id))
return false;
base::mutex.lock();
}
*out = cBuffer[cpos[id]++];
#ifndef ONE_CS
if (cpos[id] == fMaxElements)
{
base::mutex.unlock();
signalPs();
return true;
}
#endif
base::mutex.unlock();
return true;
}