about summary refs log tree commit diff
path: root/tvix/castore/src/composition.rs
diff options
context:
space:
mode:
authorYureka <tvl@yuka.dev>2024-07-21T13·28+0200
committerclbot <clbot@tvl.fyi>2024-07-21T18·37+0000
commiteea9f3d9ee90cf1da5620a9d5bfc95f151c54db4 (patch)
tree6c13a9c57fdc1de16e782ab50447babba1193a4c /tvix/castore/src/composition.rs
parent76394daca333a03dcea9851d03afb1615717239b (diff)
docs(tvix/composition): add comment about stack r/8391
Change-Id: I3888b5034c53728e2f9cfe24213f8854eb38bfe1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12005
Autosubmit: yuka <yuka@yuka.dev>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/castore/src/composition.rs')
-rw-r--r--tvix/castore/src/composition.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tvix/castore/src/composition.rs b/tvix/castore/src/composition.rs
index 53e2fe1594fb..53673cf46e45 100644
--- a/tvix/castore/src/composition.rs
+++ b/tvix/castore/src/composition.rs
@@ -274,6 +274,9 @@ pub fn add_default_services(reg: &mut Registry) {
 }
 
 pub struct CompositionContext<'a> {
+    // The stack used to detect recursive instantiations and prevent deadlocks
+    // The TypeId of the trait object is included to distinguish e.g. the
+    // BlobService "default" and the DirectoryService "default".
     stack: Vec<(TypeId, String)>,
     composition: Option<&'a Composition>,
 }