Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADDED] ConsumeContext.Closed() method for waiting for consume to be closed/drained #1691

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

piotrpio
Copy link
Collaborator

@piotrpio piotrpio commented Aug 2, 2024

Signed-off-by: Piotr Piotrowski piotr@synadia.com

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@AlexCuse
Copy link

AlexCuse commented Aug 3, 2024

Thank you so much for this

closed := s.consumer.currentSub.Closed()
s.consumer.Unlock()

<-closed
Copy link
Member

Choose a reason for hiding this comment

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

add comment what does <-closed does and what s.closed.Load() does.

Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

LGTM!

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@piotrpio piotrpio merged commit 6a7246d into main Aug 13, 2024
4 checks passed
@piotrpio piotrpio deleted the consume-closed branch August 13, 2024 07:26
@piotrpio piotrpio mentioned this pull request Aug 13, 2024
piotrpio added a commit that referenced this pull request Aug 15, 2024
…closed/drained (#1691)

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
piotrpio added a commit that referenced this pull request Aug 15, 2024
…closed/drained (#1691)

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
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.

3 participants