Skip to content

Commit 6e17b31

Browse files
committed
refactor: Make CCheckQueue non-copyable and non-movable explicitly
1 parent 8111e74 commit 6e17b31

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/checkqueue.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ class CCheckQueue
139139
}
140140
}
141141

142+
// Since this class manages its own resources, which is a thread
143+
// pool `m_worker_threads`, copy and move operations are not appropriate.
144+
CCheckQueue(const CCheckQueue&) = delete;
145+
CCheckQueue& operator=(const CCheckQueue&) = delete;
146+
CCheckQueue(CCheckQueue&&) = delete;
147+
CCheckQueue& operator=(CCheckQueue&&) = delete;
148+
142149
//! Wait until execution finishes, and return whether all evaluations were successful.
143150
bool Wait() EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
144151
{

0 commit comments

Comments
 (0)