docs(tvix/composition): add comment about stack

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
This commit is contained in:
Yureka 2024-07-21 15:28:48 +02:00 committed by clbot
parent 76394daca3
commit eea9f3d9ee

View file

@ -274,6 +274,9 @@ pub fn add_default_services(reg: &mut Registry) {
} }
pub struct CompositionContext<'a> { 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)>, stack: Vec<(TypeId, String)>,
composition: Option<&'a Composition>, composition: Option<&'a Composition>,
} }