From 6ea4665dbe46969233314b69eef11981eaaa55ae Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Sat, 25 Jan 2025 22:26:45 -0600 Subject: [PATCH] Attempt to see if moving up the mutex will help with locking issues --- cpp/ci_logic.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/ci_logic.cpp b/cpp/ci_logic.cpp index 9c2b290..5fe43b3 100644 --- a/cpp/ci_logic.cpp +++ b/cpp/ci_logic.cpp @@ -1131,10 +1131,10 @@ std::string CiLogic::queue_pull_tarball(std::vector bool is_ghost_pull = false; // Attempt to find if we've seen this package->name before + std::lock_guard lock(task_assignment_mutex); auto found_it = encountered_items.find(r->package->name); std::shared_ptr new_item = std::make_shared(); if (found_it != encountered_items.end()) { - std::lock_guard lock(task_assignment_mutex); is_ghost_pull = true; r->assign_task(job_statuses->at("pull"), found_it->second->first_pull_task, r); @@ -1146,7 +1146,6 @@ std::string CiLogic::queue_pull_tarball(std::vector continue; } - std::shared_ptr tarball_task = std::make_shared(); task_queue->enqueue( job_statuses->at("pull"), [this, r](std::shared_ptr log) mutable {