From eea9f3d9ee90cf1da5620a9d5bfc95f151c54db4 Mon Sep 17 00:00:00 2001 From: Yureka Date: Sun, 21 Jul 2024 15:28:48 +0200 Subject: [PATCH] docs(tvix/composition): add comment about stack Change-Id: I3888b5034c53728e2f9cfe24213f8854eb38bfe1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12005 Autosubmit: yuka Reviewed-by: flokli Tested-by: BuildkiteCI --- tvix/castore/src/composition.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tvix/castore/src/composition.rs b/tvix/castore/src/composition.rs index 53e2fe159..53673cf46 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>, }