Skip to content

Commit

Permalink
Fix some comments (crossbeam-rs#1095)
Browse files Browse the repository at this point in the history
Signed-off-by: InventiveCoder <[email protected]>
  • Loading branch information
InventiveCoder authored Mar 18, 2024
1 parent d6737fd commit 9e85961
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crossbeam-channel/src/flavors/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl<T> Channel<T> {
let slot = unsafe { self.buffer.get_unchecked(index) };
let stamp = slot.stamp.load(Ordering::Acquire);

// If the the stamp is ahead of the head by 1, we may attempt to pop.
// If the stamp is ahead of the head by 1, we may attempt to pop.
if head + 1 == stamp {
let new = if index + 1 < self.cap() {
// Same lap, incremented index.
Expand Down
2 changes: 1 addition & 1 deletion crossbeam-channel/src/flavors/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ impl<T> Channel<T> {

let mut head = self.head.index.load(Ordering::Acquire);
// The channel may be uninitialized, so we have to swap to avoid overwriting any sender's attempts
// to initalize the first block before noticing that the receivers disconnected. Late allocations
// to initialize the first block before noticing that the receivers disconnected. Late allocations
// will be deallocated by the sender in Drop
let mut block = self.head.block.swap(ptr::null_mut(), Ordering::AcqRel);

Expand Down
2 changes: 1 addition & 1 deletion crossbeam-epoch/src/guard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ impl Guard {
/// global cache.
///
/// Call this method after deferring execution of a function if you want to get it executed as
/// soon as possible. Flushing will make sure it is residing in in the global cache, so that
/// soon as possible. Flushing will make sure it is residing in the global cache, so that
/// any thread has a chance of taking the function and executing it.
///
/// If this method is called from an [`unprotected`] guard, it is a no-op (nothing happens).
Expand Down
2 changes: 1 addition & 1 deletion crossbeam-queue/src/array_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl<T> ArrayQueue<T> {
let slot = unsafe { self.buffer.get_unchecked(index) };
let stamp = slot.stamp.load(Ordering::Acquire);

// If the the stamp is ahead of the head by 1, we may attempt to pop.
// If the stamp is ahead of the head by 1, we may attempt to pop.
if head + 1 == stamp {
let new = if index + 1 < self.capacity() {
// Same lap, incremented index.
Expand Down
2 changes: 1 addition & 1 deletion crossbeam-utils/src/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ pub struct ScopedJoinHandle<'scope, T> {
/// Holds the result of the inner closure.
result: SharedOption<T>,

/// A handle to the the spawned thread.
/// A handle to the spawned thread.
thread: thread::Thread,

/// Borrows the parent scope with lifetime `'scope`.
Expand Down

0 comments on commit 9e85961

Please sign in to comment.