aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/worker.hh
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-09-25 23:57:46 +0200
committereldritch horrors <pennae@lix.systems>2024-09-29 14:29:14 +0000
commita5240b23abba2724073f79b79648bf4afb38f70a (patch)
treec3f9255cc1f4c0382fc8eec11a9a1363ff9ff014 /src/libstore/build/worker.hh
parent8fb642b6e09368d10d8357fcb7c508f706fa5f08 (diff)
libstore: make non-cache goal pointers strong
without circular references we do not need weak goal pointers except for caches, which should not prevent goal destructors running. caches though cannot create circular references even when they keep strong references. if we removed goals from caches when their work() is fully finished, not when their destructors are run, we could keep strong pointers in caches. since we do not gain much from this we keep those pointers weak for now. Change-Id: I1d4a6850ff5e264443c90eb4531da89f5e97a3a0
Diffstat (limited to 'src/libstore/build/worker.hh')
-rw-r--r--src/libstore/build/worker.hh5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libstore/build/worker.hh b/src/libstore/build/worker.hh
index 46adaa145..097e73cf7 100644
--- a/src/libstore/build/worker.hh
+++ b/src/libstore/build/worker.hh
@@ -84,9 +84,6 @@ private:
bool running = false;
- /* Note: the worker should only have strong pointers to the
- top-level goals. */
-
/**
* The top-level goals of the worker.
*/
@@ -95,7 +92,7 @@ private:
/**
* Goals that are ready to do some work.
*/
- WeakGoals awake;
+ Goals awake;
template<typename G>
struct CachedGoal