Skip to content

Deprecate Atomic::Flag #15805

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

Merged

Conversation

ysbaddaden
Copy link
Contributor

@ysbaddaden ysbaddaden commented May 20, 2025

Example PR that deprecates Atomic::Flag and replaces its few usages in stdlib.

The API doesn't follow the usual definition of "test and set", and the use cases are fairly limited compared to Atomic(Bool) that is more useful, for example you control memory ordering.

Related to #15786

The API doesn't follow the usual definition of "test and set", and the
use cases are fairly limited compared to Atomic(Bool) that is much more
useful, for example you control memory ordering.
@ysbaddaden ysbaddaden marked this pull request as ready for review July 28, 2025 17:34
@ysbaddaden ysbaddaden linked an issue Jul 28, 2025 that may be closed by this pull request
@straight-shoota straight-shoota added this to the 1.18.0 milestone Jul 28, 2025
@straight-shoota straight-shoota merged commit 2eb8d57 into crystal-lang:master Jul 30, 2025
39 checks passed
@ysbaddaden ysbaddaden deleted the feature/deprecate-atomic-flag branch July 31, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The return value of Atomic::Flag#test_and_set is backwards.
3 participants