Skip to content

Conversation

@frankmcsherry
Copy link
Member

The pushers::Counter type has a method give<C> that ships a container using Message::push_at. However, it targets self.pushee, rather than self. Doing so, it bypasses the accounting of the pushed container, causing unknown downstream misery. The doccomments for the method suggest that it probably shouldn't be used, though I think the intent was that it wouldn't be so certainly incorrect.

Copy link
Member

@antiguru antiguru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good!

/// This is not a validated capability, and this method should not be used without great care.
/// Ideally, users would not have direct access to a `Counter`, and preventing this is the way
/// to uphold invariants.
#[inline] pub fn give<C: crate::Container>(&mut self, time: T, container: &mut C) where P: Push<Message<T, C>> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove this function in a follow-up PR, but not here. Let's keep this compatible with the currently release version.

@antiguru antiguru merged commit a0e77e2 into TimelyDataflow:master Oct 28, 2025
7 checks passed
@github-actions github-actions bot mentioned this pull request Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants