mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-06 00:00:10 +02:00
Fix typos (#348)
This commit is contained in:
committed by
Carl Lerche
parent
68b82f5721
commit
06b2c40222
@@ -62,7 +62,7 @@ pub struct BlockingError {
|
||||
/// ideal as it requires bidirectional message passing as well as a channel to
|
||||
/// communicate which adds a level of buffering.
|
||||
///
|
||||
/// Instead, `blocking` hands off the responsiblity of processing the work queue
|
||||
/// Instead, `blocking` hands off the responsibility of processing the work queue
|
||||
/// to another thread. This hand off is light compared to a channel and does not
|
||||
/// require buffering.
|
||||
///
|
||||
|
||||
@@ -372,7 +372,7 @@ impl Builder {
|
||||
/// let park = DefaultPark::new();
|
||||
///
|
||||
/// // Decorate the `park` instance, allowing us to customize work
|
||||
/// // that happens when a worker therad goes to sleep.
|
||||
/// // that happens when a worker thread goes to sleep.
|
||||
/// decorate(park)
|
||||
/// })
|
||||
/// .build();
|
||||
|
||||
@@ -133,7 +133,7 @@ impl Inner {
|
||||
None => self.condvar.wait(m).unwrap(),
|
||||
};
|
||||
|
||||
// Transition back to idle. If the state has transitione dto `NOTIFY`,
|
||||
// Transition back to idle. If the state has transitions dto `NOTIFY`,
|
||||
// this will consume that notification
|
||||
self.state.store(IDLE, SeqCst);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ impl BackupStack {
|
||||
/// Returns `Ok` on success.
|
||||
///
|
||||
/// Returns `Err` if the pool has transitioned to the `TERMINATED` state.
|
||||
/// Whene terminated, pushing new entries is no longer permitted.
|
||||
/// When terminated, pushing new entries is no longer permitted.
|
||||
pub fn push(&self, entries: &[Backup], id: BackupId) -> Result<(), ()> {
|
||||
let mut state: State = self.state.load(Acquire).into();
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@ impl Blocking {
|
||||
debug_assert!(State::from(state).is_ptr());
|
||||
|
||||
if state != tail as usize {
|
||||
// Try aain
|
||||
// Try again
|
||||
thread::yield_now();
|
||||
continue 'outer;
|
||||
}
|
||||
@@ -438,7 +438,7 @@ impl State {
|
||||
true
|
||||
}
|
||||
|
||||
/// Add blockin capacity.
|
||||
/// Add blocking capacity.
|
||||
fn add_capacity(&mut self, capacity: usize, stub: &Task) -> bool {
|
||||
debug_assert!(capacity > 0);
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ impl Worker {
|
||||
while self.check_run_state(first) {
|
||||
first = false;
|
||||
|
||||
// Poll inbound until empty, transfering all tasks to the internal
|
||||
// Poll inbound until empty, transferring all tasks to the internal
|
||||
// queue.
|
||||
let consistent = self.drain_inbound();
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ impl Stack {
|
||||
/// Returns `Ok` on success.
|
||||
///
|
||||
/// Returns `Err` if the pool has transitioned to the `TERMINATED` state.
|
||||
/// Whene terminated, pushing new entries is no longer permitted.
|
||||
/// When terminated, pushing new entries is no longer permitted.
|
||||
pub fn push(&self, entries: &[worker::Entry], idx: usize) -> Result<(), ()> {
|
||||
let mut state: State = self.state.load(Acquire).into();
|
||||
|
||||
@@ -105,7 +105,7 @@ impl Stack {
|
||||
///
|
||||
/// If `terminate` is set and the stack is empty when this function is
|
||||
/// called, the state of the stack is transitioned to "terminated". At this
|
||||
/// point, no further workers can be pusheed onto the stack.
|
||||
/// point, no further workers can be pushed onto the stack.
|
||||
///
|
||||
/// # Return
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user