Skip to content

Commit

Permalink
Fix some comments (#1095)
Browse files Browse the repository at this point in the history
Signed-off-by: InventiveCoder <liucongcong@outlook.com>
  • Loading branch information
InventiveCoder authored and taiki-e committed May 19, 2024
1 parent a7fb27d commit 7bc1c8e
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 @@ -243,7 +243,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 @@ -584,7 +584,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 @@ -273,7 +273,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 @@ -290,7 +290,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.cap {
// 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 @@ -500,7 +500,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 7bc1c8e

Please sign in to comment.