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

std: Unignore atomic tests #13069

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/libstd/sync/atomics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
//!
//! A simple spinlock:
//!
//! ```ignore
//! # // FIXME: Needs PR #12430
//! ```
//! # // FIXME: .get() calls can be removed with Deref for Arc
//! extern crate sync;
//!
//! use sync::Arc;
Expand All @@ -52,11 +52,11 @@
//!
//! let spinlock_clone = spinlock.clone();
//! spawn(proc() {
//! spinlock_clone.store(0, SeqCst);
//! spinlock_clone.get().store(0, SeqCst);
//! });
//!
//! // Wait for the other task to release the lock
//! while spinlock.load(SeqCst) != 0 {
//! while spinlock.get().load(SeqCst) != 0 {
//! // Since tasks may not be preemptive (if they are green threads)
//! // yield to the scheduler to let the other task run. Low level
//! // concurrent code needs to take into account Rust's two threading
Expand All @@ -68,8 +68,8 @@
//!
//! Transferring a heap object with `AtomicOption`:
//!
//! ```ignore
//! # // FIXME: Needs PR #12430
//! ```
//! # // FIXME: .get() calls can be removed with Deref for Arc
//! extern crate sync;
//!
//! use sync::Arc;
Expand All @@ -82,15 +82,15 @@
//!
//! let shared_big_object_clone = shared_big_object.clone();
//! spawn(proc() {
//! let unwrapped_big_object = shared_big_object_clone.take(SeqCst);
//! let unwrapped_big_object = shared_big_object_clone.get().take(SeqCst);
//! if unwrapped_big_object.is_some() {
//! println!("got a big object from another task");
//! } else {
//! println!("other task hasn't sent big object yet");
//! }
//! });
//!
//! shared_big_object.swap(~BigObject, SeqCst);
//! shared_big_object.get().swap(~BigObject, SeqCst);
//! }
//! ```
//!
Expand Down