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

atomic.Uint8 atomic.Uint16 support not found #123

Open
sureshbabuveggalam opened this issue Oct 18, 2022 · 1 comment
Open

atomic.Uint8 atomic.Uint16 support not found #123

sureshbabuveggalam opened this issue Oct 18, 2022 · 1 comment

Comments

@sureshbabuveggalam
Copy link

go data types uint8 and uint16 is not supported on "go.uber.org/atomic"

we required these datatypes supported on atomic for optimal memory and performance

@abhinav
Copy link
Collaborator

abhinav commented Oct 18, 2022

Hello, @sureshbabuveggalam.
We can add atomic wrappers for uint8 and uint16 to the library,
but because the minimum width supported by the underlying operations is 32 bits,
these will end up being uint32 internally (e.g. atomic.Bool is a wrapper around int32)
and undo the memory/performance use you were getting out of them.

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

No branches or pull requests

2 participants