From 5e206ec9c2f32d9d13ffa557c0780bd802dafcbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Sun, 27 Oct 2024 11:11:10 +0100 Subject: [PATCH] Remove unnecessary notify --- nano/node/blockprocessor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nano/node/blockprocessor.cpp b/nano/node/blockprocessor.cpp index 5eaae85fa2..361cf7877a 100644 --- a/nano/node/blockprocessor.cpp +++ b/nano/node/blockprocessor.cpp @@ -256,8 +256,9 @@ void nano::block_processor::run () } else { - condition.notify_one (); - condition.wait (lock); + condition.wait (lock, [this] { + return stopped || !queue.empty (); + }); } } }