add debug code
This commit is contained in:
parent
127074f85e
commit
af9343ac49
1 changed files with 6 additions and 1 deletions
|
|
@ -23,6 +23,7 @@
|
|||
**************************************************************************
|
||||
*/
|
||||
|
||||
#include "util.h"
|
||||
#include <cstdio>
|
||||
#include "task_interface.hpp"
|
||||
|
||||
|
|
@ -41,6 +42,8 @@ TaskInterface::~TaskInterface() {
|
|||
|
||||
void TaskInterface::push_fresh(std::unique_ptr<InputType> task) {
|
||||
|
||||
DEBUG_PRINT("New task in the queue!");
|
||||
|
||||
// lock the queue and insert into it
|
||||
std::lock_guard<std::mutex> 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<pl::SimOutputArtifact> TaskInterface::get_reference(const db::uu
|
|||
void TaskInterface::store_reference(const db::uuid_t& id, std::shared_ptr<pl::SimOutputArtifact> reference) {
|
||||
std::lock_guard<std::mutex> 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue