Skip to content

Deprecate Atomic::Flag#15805

Merged
straight-shoota merged 4 commits intocrystal-lang:masterfrom
ysbaddaden:feature/deprecate-atomic-flag
Jul 30, 2025
Merged

Deprecate Atomic::Flag#15805
straight-shoota merged 4 commits intocrystal-lang:masterfrom
ysbaddaden:feature/deprecate-atomic-flag

Conversation

@ysbaddaden
Copy link
Collaborator

@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