diff --git a/base/commands_queue.cpp b/base/commands_queue.cpp index ab2925f30b..5a22f24e2f 100644 --- a/base/commands_queue.cpp +++ b/base/commands_queue.cpp @@ -227,7 +227,10 @@ namespace core void CommandsQueue::Clear() { + threads::ConditionGuard g(m_cond); + size_t s = m_commands.Size(); m_commands.Clear(); + m_activeCommands -= s; } int CommandsQueue::ExecutorsCount() const