diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-07-07 10:43:09 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-10-03 10:52:17 +0100 |
commit | 6e17b3168072ab77ed7170ab81327c017877133a (patch) | |
tree | b7513219cc33cf45ceb745134042c1c8ddb4b5b9 /src/checkqueue.h | |
parent | 8111e74653dc5c93cb510672d99048c3f741d8dc (diff) | |
download | bitcoin-6e17b3168072ab77ed7170ab81327c017877133a.tar.xz |
refactor: Make `CCheckQueue` non-copyable and non-movable explicitly
Diffstat (limited to 'src/checkqueue.h')
-rw-r--r-- | src/checkqueue.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/checkqueue.h b/src/checkqueue.h index f3c126e262..a1de000714 100644 --- a/src/checkqueue.h +++ b/src/checkqueue.h @@ -139,6 +139,13 @@ public: } } + // Since this class manages its own resources, which is a thread + // pool `m_worker_threads`, copy and move operations are not appropriate. + CCheckQueue(const CCheckQueue&) = delete; + CCheckQueue& operator=(const CCheckQueue&) = delete; + CCheckQueue(CCheckQueue&&) = delete; + CCheckQueue& operator=(CCheckQueue&&) = delete; + //! Wait until execution finishes, and return whether all evaluations were successful. bool Wait() EXCLUSIVE_LOCKS_REQUIRED(!m_mutex) { |