From 14f09276a5f46f5506d4a0a92a594351cbc69158 Mon Sep 17 00:00:00 2001 From: Frank McSherry Date: Sun, 11 Jan 2026 08:27:58 -0500 Subject: [PATCH] Make InputSession public; document it --- timely/src/dataflow/operators/generic/handles.rs | 5 +++++ timely/src/dataflow/operators/generic/mod.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/timely/src/dataflow/operators/generic/handles.rs b/timely/src/dataflow/operators/generic/handles.rs index 16f41b21c..d31c36be6 100644 --- a/timely/src/dataflow/operators/generic/handles.rs +++ b/timely/src/dataflow/operators/generic/handles.rs @@ -19,6 +19,11 @@ use crate::container::{CapacityContainerBuilder, PushInto}; use crate::dataflow::operators::InputCapability; use crate::dataflow::operators::capability::CapabilityTrait; +/// An input wrapper type that exists to provide a `must_use` decoration. +/// +/// This type is consumed by its methods `for_each` and `for_each_time`, either of which should be called on it. +/// Failure to call either of these methods is very likely a logical error, as it means that input data may linger +/// indefinitely, as the system will not re-invoke the operator until there is additional input data (or another reason). #[must_use] pub struct InputSession<'a, T: Timestamp, C, P: Pull>> { input: &'a mut InputHandleCore, diff --git a/timely/src/dataflow/operators/generic/mod.rs b/timely/src/dataflow/operators/generic/mod.rs index 59a4c1a33..a7890d607 100644 --- a/timely/src/dataflow/operators/generic/mod.rs +++ b/timely/src/dataflow/operators/generic/mod.rs @@ -8,7 +8,7 @@ mod handles; mod notificator; mod operator_info; -pub use self::handles::{InputHandleCore, OutputBuilder, OutputBuilderSession, Session}; +pub use self::handles::{InputHandleCore, InputSession, OutputBuilder, OutputBuilderSession, Session}; pub use self::notificator::{Notificator, FrontierNotificator}; pub use self::operator::{Operator, source};