From 8e17f3a1e99b17e989cb11cfa3539ec6292f3ce0 Mon Sep 17 00:00:00 2001 From: fuzhe1989 Date: Fri, 11 Mar 2022 08:32:25 +0800 Subject: [PATCH] update Signed-off-by: fuzhe1989 --- dbms/src/Common/MPMCQueue.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dbms/src/Common/MPMCQueue.h b/dbms/src/Common/MPMCQueue.h index 48bc489da90..47370c94e89 100644 --- a/dbms/src/Common/MPMCQueue.h +++ b/dbms/src/Common/MPMCQueue.h @@ -55,6 +55,7 @@ class MPMCQueue ~MPMCQueue() { + std::unique_lock lock(mu); for (; read_pos < write_pos; ++read_pos) destruct(getObj(read_pos)); }