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

runtime: Why does hchan's closed field typed as uint32 and not as uint8 or bool? #44038

Closed
FluorescentTouch opened this issue Feb 1, 2021 · 1 comment

Comments

@FluorescentTouch
Copy link
Contributor

@FluorescentTouch FluorescentTouch commented Feb 1, 2021

closed uint32

I tried to find answer, but failed.
Hchan's closed field can store values 0 or 1.
What was the reason not to use at least uint8 or uint16 instead of uint32 ?
What the fundamental reasons not to use bool?
Hope, @dvyukov (last modifier of this code) or anyone else can explain this to me for better understanding of chan internals.

@FluorescentTouch FluorescentTouch changed the title runtime: Why does hchan's closed field typed as uint32 and not as uint16 or bool? runtime: Why does hchan's closed field typed as uint32 and not as uint8 or bool? Feb 1, 2021
@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Feb 1, 2021

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants