From 944ea0e5b613d901ba834dc225eb9d379b750bd3 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 12 Feb 2024 15:47:31 +0800 Subject: WORKING: make Buffer track two sides. --- include/cru/common/concurrent/ConcurrentQueue.h | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'include/cru/common/concurrent/ConcurrentQueue.h') diff --git a/include/cru/common/concurrent/ConcurrentQueue.h b/include/cru/common/concurrent/ConcurrentQueue.h index 4f649a41..e311d5f9 100644 --- a/include/cru/common/concurrent/ConcurrentQueue.h +++ b/include/cru/common/concurrent/ConcurrentQueue.h @@ -24,28 +24,6 @@ class ConcurrentQueue { ConcurrentQueue(const ConcurrentQueue&) = delete; ConcurrentQueue& operator=(const ConcurrentQueue&) = delete; - ConcurrentQueue(ConcurrentQueue&& other) - : head_(other.head_), - tail_(other.tail_), - mutex_(std::move(other.mutex_)), - condition_variable_(std::move(other.condition_variable_)) { - other.head_ = nullptr; - other.tail_ = nullptr; - } - - ConcurrentQueue& operator=(ConcurrentQueue&& other) { - if (this != &other) { - head_ = other.head_; - tail_ = other.tail_; - mutex_ = std::move(other.mutex_); - condition_variable_ = std::move(other.condition_variable_); - other.head_ = nullptr; - other.tail_ = nullptr; - return *this; - } - return *this; - } - ~ConcurrentQueue() { if (head_) { auto node = head_; -- cgit v1.2.3