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

fix: rewrite OrDone() to be more clear and make sure it handles all data #56

Closed
wants to merge 1 commit into from

Conversation

computator
Copy link
Member

Currently if OrDone() receives data at the same time as a done signal it could potentially quit before sending on that last data. This resolves that race condition as well as rewriting the code to make the process more clear.

@computator
Copy link
Member Author

Closing this per discussion:

  • Although it might be theoretically possible to receive on in and done at the same time, that is not relevant for how OrDone() is intended to be used.
  • Although the rest of the rewrite may be more detailed in how the process works, it is less idiomatic.

@computator computator closed this Oct 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant