diff options
Diffstat (limited to 'tokio/src/sync/mpsc/block.rs')
-rw-r--r-- | tokio/src/sync/mpsc/block.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tokio/src/sync/mpsc/block.rs b/tokio/src/sync/mpsc/block.rs index f03648ba..4af990bf 100644 --- a/tokio/src/sync/mpsc/block.rs +++ b/tokio/src/sync/mpsc/block.rs @@ -107,7 +107,7 @@ impl<T> Block<T> { other_index.wrapping_sub(self.start_index) / BLOCK_CAP } - /// Read the value at the given offset. + /// Reads the value at the given offset. /// /// Returns `None` if the slot is empty. /// @@ -135,7 +135,7 @@ impl<T> Block<T> { Some(Read::Value(value.assume_init())) } - /// Write a value to the block at the given offset. + /// Writes a value to the block at the given offset. /// /// # Safety /// @@ -162,7 +162,7 @@ impl<T> Block<T> { self.ready_slots.fetch_or(TX_CLOSED, Release); } - /// Reset the block to a blank state. This enables reusing blocks in the + /// Resets the block to a blank state. This enables reusing blocks in the /// channel. /// /// # Safety @@ -177,7 +177,7 @@ impl<T> Block<T> { self.ready_slots = AtomicUsize::new(0); } - /// Release the block to the rx half for freeing. + /// Releases the block to the rx half for freeing. /// /// This function is called by the tx half once it can be guaranteed that no /// more senders will attempt to access the block. @@ -229,7 +229,7 @@ impl<T> Block<T> { } } - /// Load the next block + /// Loads the next block pub(crate) fn load_next(&self, ordering: Ordering) -> Option<NonNull<Block<T>>> { let ret = NonNull::new(self.next.load(ordering)); @@ -241,7 +241,7 @@ impl<T> Block<T> { ret } - /// Push `block` as the next block in the link. + /// Pushes `block` as the next block in the link. /// /// Returns Ok if successful, otherwise, a pointer to the next block in /// the list is returned. @@ -274,7 +274,7 @@ impl<T> Block<T> { } } - /// Grow the `Block` linked list by allocating and appending a new block. + /// Grows the `Block` linked list by allocating and appending a new block. /// /// The next block in the linked list is returned. This may or may not be /// the one allocated by the function call. |