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

Use new atomic types from Go 1.19 #444

Merged
merged 2 commits into from
Apr 12, 2024
Merged

Use new atomic types from Go 1.19 #444

merged 2 commits into from
Apr 12, 2024

Conversation

Jacalz
Copy link
Contributor

@Jacalz Jacalz commented Apr 9, 2024

This is a cleaner solution for the fix in #438 thanks to the fact that Go 1.19 now is the default and the atomic.Int64 types are automatically aligned correctly on 32 bit systems.

Using this also means that xsync.Int64 can be removed. The new atomic.Int64 type solves the issue and should be quite a lot faster as it avoids the interface conversion.

Verified

This commit was signed with the committer’s verified signature.
Jacalz Jacob Alzén
This is a cleaner solution for the fix in #438 thanks to the fact that Go 1.19 now is the default and the atomic.Int64 types are automatically aligned correctly on 32 bit systems.

Using this also means that xsync.Int64 can be removed. The new atomic.Int64 type solves the issue and should be quite a lot faster as it avoids the interface conversion.
Copy link
Contributor

@nhooyr nhooyr left a comment

Choose a reason for hiding this comment

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

Awesome thanks @Jacalz

Verified

This commit was signed with the committer’s verified signature.
Jacalz Jacob Alzén
@Jacalz Jacalz requested a review from nhooyr April 12, 2024 12:58
Copy link
Contributor

@nhooyr nhooyr left a comment

Choose a reason for hiding this comment

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

Nice thank you @Jacalz

@nhooyr nhooyr merged commit 35fb753 into coder:dev Apr 12, 2024
4 checks passed
@Jacalz Jacalz deleted the atomic-cleanup branch April 12, 2024 18:59
@Jacalz
Copy link
Contributor Author

Jacalz commented Apr 12, 2024

No problem. Happy to help :)

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.

None yet

2 participants