From 398894b85672f5197b5fc3eeae3fa2ec32f03908 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sun, 25 Aug 2024 13:41:56 +0200 Subject: libstore: make Goal::ex a shared_ptr this makes WorkResult copyable, and just all around easier to deal with. in the future we'll need this to let Goal::work() return a promise for a WorkResult (or even just a Finished) that can be awaited by other goals. Change-Id: Ic5a1ce04c5a0f8e683bd00a2ed2b77a2e28989c1 --- src/libstore/build/worker.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore/build/worker.cc') diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index 4a70b272a..1b4633e64 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -150,7 +150,7 @@ void Worker::goalFinished(GoalPtr goal, Goal::Finished & f) if (!goal->waiters.empty()) logError(f.ex->info()); else - goal->ex = std::move(f.ex); + goal->ex = f.ex; } for (auto & i : goal->waiters) { -- cgit v1.2.3