sync: fix some doc typos (#2838)

Fixes #2781.
This commit is contained in:
Nylonicious
2020-09-17 08:03:38 +02:00
committed by GitHub
parent 4c4699be00
commit 3fd043931e
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -793,7 +793,7 @@ where
/// This is useful for a flavor of "optimistic check" before deciding to
/// await on a receiver.
///
/// Compared with [`recv`], this function has three failure cases instead of one
/// Compared with [`recv`], this function has three failure cases instead of two
/// (one for closed, one for an empty buffer, one for a lagging receiver).
///
/// `Err(TryRecvError::Closed)` is returned when all `Sender` halves have
+1 -1
View File
@@ -20,7 +20,7 @@
//! few flavors of channels provided by Tokio. Each channel flavor supports
//! different message passing patterns. When a channel supports multiple
//! producers, many separate tasks may **send** messages. When a channel
//! supports muliple consumers, many different separate tasks may **receive**
//! supports multiple consumers, many different separate tasks may **receive**
//! messages.
//!
//! Tokio provides many different channel flavors as different message passing
+1 -1
View File
@@ -1,7 +1,7 @@
use super::batch_semaphore as ll; // low level implementation
use std::sync::Arc;
/// Counting semaphore performing asynchronous permit aquisition.
/// Counting semaphore performing asynchronous permit acquisition.
///
/// A semaphore maintains a set of permits. Permits are used to synchronize
/// access to a shared resource. A semaphore differs from a mutex in that it
+1 -1
View File
@@ -910,7 +910,7 @@ impl Waiter {
}
/// Try to decrement the number of permits to acquire. This returns the
/// actual number of permits that were decremented. The delta betweeen `n`
/// actual number of permits that were decremented. The delta between `n`
/// and the return has been assigned to the permit and the caller must
/// assign these back to the semaphore.
fn try_dec_permits_to_acquire(&self, n: usize) -> usize {