From fc2e5aa13594f93e89c273790141f17524e7beac Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 13 Aug 2022 16:02:14 -0400 Subject: [PATCH] Merge pull request #3574 from peat-psuwit/for-upstream/zmdb-thread-init db: start the processing thread after all fields are initialized --- src/zm_db.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/zm_db.cpp b/src/zm_db.cpp index bc2fa43d4..87b5a538b 100644 --- a/src/zm_db.cpp +++ b/src/zm_db.cpp @@ -229,9 +229,10 @@ zmDbRow::~zmDbRow() { } zmDbQueue::zmDbQueue() : - mThread(&zmDbQueue::process, this), mTerminate(false) -{ } +{ + mThread = std::thread(&zmDbQueue::process, this); +} zmDbQueue::~zmDbQueue() { stop();