aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/concurrent/ConcurrentQueue.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-02-12 15:47:31 +0800
committercrupest <crupest@outlook.com>2024-03-24 20:03:58 +0800
commit944ea0e5b613d901ba834dc225eb9d379b750bd3 (patch)
tree9cdeae736bc635481b4cd3d6024d1d5d0c5072df /include/cru/common/concurrent/ConcurrentQueue.h
parentb2051e28cd36c49b7c5d49b511646a3856d7eaf0 (diff)
downloadcru-944ea0e5b613d901ba834dc225eb9d379b750bd3.tar.gz
cru-944ea0e5b613d901ba834dc225eb9d379b750bd3.tar.bz2
cru-944ea0e5b613d901ba834dc225eb9d379b750bd3.zip
WORKING: make Buffer track two sides.
Diffstat (limited to 'include/cru/common/concurrent/ConcurrentQueue.h')
-rw-r--r--include/cru/common/concurrent/ConcurrentQueue.h22
1 files changed, 0 insertions, 22 deletions
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_;