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

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
Member

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

@golang golang locked and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants