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

Fixed a bug in Sync where we were using an object through a

reference to a shared pointer.  A deref of the shared ptr could
trigger the dtor of the object while threads are waiting.  Fixed that
by properly copying the shared ptr.
This commit is contained in:
Patrick LeBlanc
2019-05-13 12:11:16 -05:00
parent 19859de510
commit aad393dd34
2 changed files with 28 additions and 13 deletions

View File

@@ -51,11 +51,13 @@ class Synchronizer : public boost::noncopyable
struct PendingOps
{
PendingOps(int flags);
~PendingOps();
int opFlags;
int waiters;
bool finished;
boost::condition condvar;
void wait(boost::recursive_mutex *);
void notify(boost::recursive_mutex *);
void notify();
};
struct Job : public ThreadPool::Job