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

Address comments from #4395 #4379 #4399

Closed
pellared opened this issue Aug 2, 2023 · 1 comment · Fixed by #4417
Closed

Address comments from #4395 #4379 #4399

pellared opened this issue Aug 2, 2023 · 1 comment · Fixed by #4417
Assignees

Comments

@pellared
Copy link
Member

pellared commented Aug 2, 2023

Why we are closing the channel?

  1. This is not needed
  2. The consumer/receiver should never close the channel

Reference: https://go101.org/article/channel-closing.html

One general principle of using Go channels is don't close a channel from the receiver side and don't close a channel if the channel has multiple concurrent senders.

PS. I would rather use sync.WaitGroup like I suggest in another comment.

Originally posted by @pellared in #4395 (comment)

@pellared
Copy link
Member Author

pellared commented Aug 2, 2023

Look also at #4379 (comment)

@pellared pellared changed the title Address comments from #4395 Address comments from #4395 #4379 Aug 2, 2023
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 a pull request may close this issue.

1 participant