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

Can add Int and Uint? #47

Closed
mei-rune opened this issue Mar 25, 2019 · 4 comments
Closed

Can add Int and Uint? #47

mei-rune opened this issue Mar 25, 2019 · 4 comments

Comments

@mei-rune
Copy link

No description provided.

@prashantv
Copy link
Collaborator

This package wraps the operations in the standard library atomic package:
https://golang.org/pkg/sync/atomic/

int and uint don't have functions in that package, and they have different sizes based on architecture. We could assume worst-case and add functions that assume int64 or uint64, but the user can easily do the same.

The most "correct" solution would be if int and uint used either the 32-bit or 64-bit types underneath based on architecture -- but I'd also want to have the code be architecture agnostic.

@tisonkun
Copy link
Contributor

tisonkun commented Jun 8, 2021

Yep. int and uint are os dependent and atomic doesn't support it. I think we can close this issue unless others give a more in-detail reason and how to support them.

@tisonkun
Copy link
Contributor

tisonkun commented Jun 8, 2021

cc @abhinav

@abhinav
Copy link
Collaborator

abhinav commented Jun 8, 2021

Reasonable. Thanks @tisonkun.

@abhinav abhinav closed this as completed Jun 8, 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
Development

No branches or pull requests

4 participants