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

Add function to wait for EOF #673

Merged
merged 2 commits into from
Dec 27, 2024
Merged

Add function to wait for EOF #673

merged 2 commits into from
Dec 27, 2024

Conversation

noborus
Copy link
Owner

@noborus noborus commented Dec 25, 2024

Added WaitEOF function to wait for EOF notification.

Added `WaitEOF` function to wait for EOF notification.
oviewer/document.go Outdated Show resolved Hide resolved
@@ -59,6 +59,8 @@ type Document struct {
// alignConv is an interface that converts alignment.
alignConv *align

cond *sync.Cond
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you really need this?

I have never faced sync.Cond until now, so I looked at documentation

https://pkg.go.dev/sync#Cond

For many simple use cases, users will be better off using channels than a Cond

Copy link
Owner Author

Choose a reason for hiding this comment

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

Do you really need this?

I have never faced sync.Cond until now, so I looked at documentation

https://pkg.go.dev/sync#Cond

For many simple use cases, users will be better off using channels than a Cond

That's a good point.
I thought it would be best to use Broadcast (), which does not have to be received or does not need to receive more than one.
I think it is difficult to implement it without mistakes on a channel.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK then

Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
@noborus noborus merged commit 0af2c9d into master Dec 27, 2024
8 checks passed
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