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

[stdlib] Make atomics sharable #3943

Closed
wants to merge 1 commit into from

Conversation

owenhilyard
Copy link
Contributor

Prior to this, most atomic operations required a mutable reference, which meant you had statically guarenteed mutual exclusion, which means you don't need atomics. This fixes those operations to only require an immutable reference, allowing them to be used in multiple threads.

Prior to this, most atomic operations required a mutable reference,
which meant you had statically guarenteed mutual exclusion, which means
you don't need atomics. This fixes those operations to only require an
immutable reference, allowing them to be used in multiple threads.

Signed-off-by: Owen Hilyard <[email protected]>
@owenhilyard owenhilyard requested a review from a team as a code owner January 13, 2025 05:00
@JoeLoser
Copy link
Collaborator

!sync

@modularbot modularbot added the imported-internally Signals that a given pull request has been imported internally. label Jan 13, 2025
@JoeLoser
Copy link
Collaborator

!sync

@modularbot
Copy link
Collaborator

✅🟣 This contribution has been merged 🟣✅

Your pull request has been merged to the internal upstream Mojo sources. It will be reflected here in the Mojo repository on the nightly branch during the next Mojo nightly release, typically within the next 24-48 hours.

We use Copybara to merge external contributions, click here to learn more.

@modularbot modularbot added the merged-internally Indicates that this pull request has been merged internally label Jan 14, 2025
modularbot pushed a commit that referenced this pull request Jan 15, 2025
[External] [stdlib] Make atomics sharable

Prior to this, most atomic operations required a mutable reference,
which meant you had statically guarenteed mutual exclusion, which means
you don't need atomics. This fixes those operations to only require an
immutable reference, allowing them to be used in multiple threads.

Co-authored-by: Owen Hilyard <[email protected]>
Closes #3943
MODULAR_ORIG_COMMIT_REV_ID: ba2460225e7243f65d80ea397c97c9c0a77f26f6
@modularbot modularbot added the merged-externally Merged externally in public mojo repo label Jan 15, 2025
@modularbot
Copy link
Collaborator

Landed in eb7eb3d! Thank you for your contribution 🎉

@modularbot modularbot closed this Jan 15, 2025
@owenhilyard owenhilyard deleted the fix-atomics branch January 15, 2025 18:57
jjvraw pushed a commit to jjvraw/mojo that referenced this pull request Jan 16, 2025
[External] [stdlib] Make atomics sharable

Prior to this, most atomic operations required a mutable reference,
which meant you had statically guarenteed mutual exclusion, which means
you don't need atomics. This fixes those operations to only require an
immutable reference, allowing them to be used in multiple threads.

Co-authored-by: Owen Hilyard <[email protected]>
Closes modular#3943
MODULAR_ORIG_COMMIT_REV_ID: ba2460225e7243f65d80ea397c97c9c0a77f26f6

Signed-off-by: Joshua James Venter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported-internally Signals that a given pull request has been imported internally. merged-externally Merged externally in public mojo repo merged-internally Indicates that this pull request has been merged internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants