Skip to content

Commit

Permalink
Add a comment that the Atomic* are all implicitly Send
Browse files Browse the repository at this point in the history
  • Loading branch information
tbu- committed Sep 15, 2015
1 parent d2e13e8 commit 1b3745f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libcore/sync/atomic.rs
Expand Up @@ -92,6 +92,7 @@ impl Default for AtomicBool {
}
}

// Send is implicitly implemented for AtomicBool.
unsafe impl Sync for AtomicBool {}

/// A signed integer type which can be safely shared between threads.
Expand All @@ -106,6 +107,7 @@ impl Default for AtomicIsize {
}
}

// Send is implicitly implemented for AtomicIsize.
unsafe impl Sync for AtomicIsize {}

/// An unsigned integer type which can be safely shared between threads.
Expand All @@ -120,6 +122,7 @@ impl Default for AtomicUsize {
}
}

// Send is implicitly implemented for AtomicUsize.
unsafe impl Sync for AtomicUsize {}

/// A raw pointer type which can be safely shared between threads.
Expand Down

0 comments on commit 1b3745f

Please sign in to comment.