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

Close immediate channel after writing to it to close wait group in merge logic #490

Merged
merged 1 commit into from
May 16, 2024

Conversation

phillebaba
Copy link
Member

I realized that the merge channel will never close because the buffered channel will stay open. By closing the immediate channel we make sure that it completes immediately in the merge logic. This will leave the second channel as the only channel controlling when to close the merged channel.

Copy link
Contributor

@bittrance bittrance left a comment

Choose a reason for hiding this comment

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

Good catch!

@phillebaba phillebaba merged commit 0a90881 into main May 16, 2024
8 checks passed
@phillebaba phillebaba deleted the fix/immediate-channel branch May 16, 2024 21:03
t1mt pushed a commit to t1mt/spegel that referenced this pull request Sep 3, 2024
Close immediate channel after writing to it to close wait group in merge logic
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