From af9343ac49c9f15931fd2c2442bf05e96e7fca69 Mon Sep 17 00:00:00 2001 From: Fabian Posch Date: Fri, 3 Jan 2025 12:56:21 +0100 Subject: [PATCH] add debug code --- src/actsim_agent/task_interface.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/actsim_agent/task_interface.cpp b/src/actsim_agent/task_interface.cpp index 2ac7a7b..00e12ce 100644 --- a/src/actsim_agent/task_interface.cpp +++ b/src/actsim_agent/task_interface.cpp @@ -23,6 +23,7 @@ ************************************************************************** */ +#include "util.h" #include #include "task_interface.hpp" @@ -41,6 +42,8 @@ TaskInterface::~TaskInterface() { void TaskInterface::push_fresh(std::unique_ptr task) { + DEBUG_PRINT("New task in the queue!"); + // lock the queue and insert into it std::lock_guard lock(this->fresh_queue_mutex); this->fresh_queue.push(std::move(task)); @@ -86,6 +89,8 @@ void TaskInterface::wait_for_fresh() { // we will be notified either when there is new data or the program has been stopped this->fresh_queue_empty_condition.wait(lock, [&] { return !this->fresh_queue_empty() || !running(); }); + + DEBUG_PRINT("Worker released from block"); } void TaskInterface::wait_for_finished() { @@ -265,7 +270,7 @@ std::shared_ptr TaskInterface::get_reference(const db::uu void TaskInterface::store_reference(const db::uuid_t& id, std::shared_ptr reference) { std::lock_guard lock (this->references_mutex); - DEBUG_PRINT("Storing new design with ID " + db::to_string(id)); + DEBUG_PRINT("Storing new reference with ID " + db::to_string(id)); // make sure the reference run isn't already in the list of reference runs // if it is, just increment its reference counter