From c34a01e9a5747b16628bbf02a2a1a3cb9e562ab0 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:31 -0400 Subject: [PATCH 01/23] spelling: acquire Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio-util/src/sync/cancellation_token/tree_node.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio-util/src/sync/cancellation_token/tree_node.rs b/tokio-util/src/sync/cancellation_token/tree_node.rs index b6cd698e23d..8f97dee8de5 100644 --- a/tokio-util/src/sync/cancellation_token/tree_node.rs +++ b/tokio-util/src/sync/cancellation_token/tree_node.rs @@ -200,7 +200,7 @@ where /// `parent` MUST have been a parent of the node when they both got locked, /// otherwise there is a potential for a deadlock as invariant #2 would be violated. /// -/// To aquire the locks for node and parent, use [with_locked_node_and_parent]. +/// To acquire the locks for node and parent, use [with_locked_node_and_parent]. fn move_children_to_parent(node: &mut Inner, parent: &mut Inner) { // Pre-allocate in the parent, for performance parent.children.reserve(node.children.len()); @@ -218,7 +218,7 @@ fn move_children_to_parent(node: &mut Inner, parent: &mut Inner) { /// Removes a child from the parent. /// /// `parent` MUST be the parent of `node`. -/// To aquire the locks for node and parent, use [with_locked_node_and_parent]. +/// To acquire the locks for node and parent, use [with_locked_node_and_parent]. fn remove_child(parent: &mut Inner, mut node: MutexGuard<'_, Inner>) { // Query the position from where to remove a node let pos = node.parent_idx; From 6f8a6638402517307702e018008e179a9a231fc4 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 18:53:10 -0400 Subject: [PATCH 02/23] chore: after Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/tests/macros_join.rs | 2 +- tokio/tests/macros_try_join.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio/tests/macros_join.rs b/tokio/tests/macros_join.rs index 17eba20efd9..b2969557f45 100644 --- a/tokio/tests/macros_join.rs +++ b/tokio/tests/macros_join.rs @@ -86,7 +86,7 @@ async fn non_cooperative_task(permits: Arc) -> usize { let mut exceeded_budget = 0; for _ in 0..5 { - // Another task should run after after this task uses its whole budget + // Another task should run after this task uses its whole budget for _ in 0..128 { let _permit = permits.clone().acquire_owned().await.unwrap(); } diff --git a/tokio/tests/macros_try_join.rs b/tokio/tests/macros_try_join.rs index c1bf6d3f16a..876de0b496a 100644 --- a/tokio/tests/macros_try_join.rs +++ b/tokio/tests/macros_try_join.rs @@ -114,7 +114,7 @@ async fn non_cooperative_task(permits: Arc) -> Result let mut exceeded_budget = 0; for _ in 0..5 { - // Another task should run after after this task uses its whole budget + // Another task should run after this task uses its whole budget for _ in 0..128 { let _permit = permits.clone().acquire_owned().await.unwrap(); } From 02d388e8755ee573713c2022365f8125c14c31b3 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:31 -0400 Subject: [PATCH 03/23] chore: budgeting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/src/coop.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/coop.rs b/tokio/src/coop.rs index eaedae9b1b2..1ed1d17aa9f 100644 --- a/tokio/src/coop.rs +++ b/tokio/src/coop.rs @@ -215,7 +215,7 @@ mod test { } #[test] - fn bugeting() { + fn budgeting() { use futures::future::poll_fn; use tokio_test::*; From e38a1aaad81a2ffb9fe60a56d09038b302e1751b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 18:52:14 -0400 Subject: [PATCH 04/23] chore: can Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/src/task/consume_budget.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/task/consume_budget.rs b/tokio/src/task/consume_budget.rs index c8b2d7e5ceb..7c46444b7ea 100644 --- a/tokio/src/task/consume_budget.rs +++ b/tokio/src/task/consume_budget.rs @@ -4,7 +4,7 @@ use std::task::Poll; /// runtime *if* the task's coop budget was exhausted. /// /// The task will only yield if its entire coop budget has been exhausted. -/// This function can can be used in order to insert optional yield points into long +/// This function can be used in order to insert optional yield points into long /// computations that do not use Tokio resources like sockets or semaphores, /// without redundantly yielding to the runtime each time. /// From 8f2f1bade1dc2d58d424c1112b553eca490210cb Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:32 -0400 Subject: [PATCH 05/23] chore: capacity Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio-util/src/time/delay_queue.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio-util/src/time/delay_queue.rs b/tokio-util/src/time/delay_queue.rs index 07082b97793..f6a3c63a5b9 100644 --- a/tokio-util/src/time/delay_queue.rs +++ b/tokio-util/src/time/delay_queue.rs @@ -190,7 +190,7 @@ impl SlabStorage { let key_contained = self.key_map.contains_key(&key.into()); if key_contained { - // It's possible that a `compact` call creates capacitiy in `self.inner` in + // It's possible that a `compact` call creates capacity in `self.inner` in // such a way that a `self.inner.insert` call creates a `key` which was // previously given out during an `insert` call prior to the `compact` call. // If `key` is contained in `self.key_map`, we have encountered this exact situation, From 938a933d8f251838128530051bdf1feeae2cccfa Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:07:22 -0400 Subject: [PATCH 06/23] chore: children Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio-util/src/sync/tests/loom_cancellation_token.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio-util/src/sync/tests/loom_cancellation_token.rs b/tokio-util/src/sync/tests/loom_cancellation_token.rs index e9c9f3dd980..4007b5be8c5 100644 --- a/tokio-util/src/sync/tests/loom_cancellation_token.rs +++ b/tokio-util/src/sync/tests/loom_cancellation_token.rs @@ -80,7 +80,7 @@ fn drop_token_no_child() { } #[test] -fn drop_token_with_childs() { +fn drop_token_with_children() { loom::model(|| { let token1 = CancellationToken::new(); let child_token1 = token1.child_token(); From 10afe46646b19612d1a3e1e71f15ea8096688732 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 18:52:46 -0400 Subject: [PATCH 07/23] chore: field Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/src/time/driver/entry.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/time/driver/entry.rs b/tokio/src/time/driver/entry.rs index eb33e9a2aa2..48856bf3223 100644 --- a/tokio/src/time/driver/entry.rs +++ b/tokio/src/time/driver/entry.rs @@ -36,7 +36,7 @@ //! point than it was originally scheduled for. //! //! This is accomplished by lazily rescheduling timers. That is, we update the -//! state field field with the true expiration of the timer from the holder of +//! state field with the true expiration of the timer from the holder of //! the [`TimerEntry`]. When the driver services timers (ie, whenever it's //! walking lists of timers), it checks this "true when" value, and reschedules //! based on it. From 80060a683e87efc4187cbd3cd4b0311b212aa451 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 18:51:25 -0400 Subject: [PATCH 08/23] chore: github Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- SECURITY.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index bf155ff9e2f..75c2c4d3ce7 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,13 +1,13 @@ ## Report a security issue -The Tokio project team welcomes security reports and is committed to providing prompt attention to security issues. Security issues should be reported privately via [security@tokio.rs](mailto:security@tokio.rs). Security issues should not be reported via the public Github Issue tracker. +The Tokio project team welcomes security reports and is committed to providing prompt attention to security issues. Security issues should be reported privately via [security@tokio.rs](mailto:security@tokio.rs). Security issues should not be reported via the public GitHub Issue tracker. ## Vulnerability coordination -Remediation of security vulnerabilities is prioritized by the project team. The project team coordinates remediation with third-party project stakeholders via [Github Security Advisories](https://help.github.com/en/github/managing-security-vulnerabilities/about-github-security-advisories). Third-party stakeholders may include the reporter of the issue, affected direct or indirect users of Tokio, and maintainers of upstream dependencies if applicable. +Remediation of security vulnerabilities is prioritized by the project team. The project team coordinates remediation with third-party project stakeholders via [GitHub Security Advisories](https://help.github.com/en/github/managing-security-vulnerabilities/about-github-security-advisories). Third-party stakeholders may include the reporter of the issue, affected direct or indirect users of Tokio, and maintainers of upstream dependencies if applicable. -Downstream project maintainers and Tokio users can request participation in coordination of applicable security issues by sending your contact email address, Github username(s) and any other salient information to [security@tokio.rs](mailto:security@tokio.rs). Participation in security issue coordination processes is at the discretion of the Tokio team. +Downstream project maintainers and Tokio users can request participation in coordination of applicable security issues by sending your contact email address, GitHub username(s) and any other salient information to [security@tokio.rs](mailto:security@tokio.rs). Participation in security issue coordination processes is at the discretion of the Tokio team. ## Security advisories -The project team is committed to transparency in the security issue disclosure process. The Tokio team announces security issues via [project Github Release notes](https://github.com/tokio-rs/tokio/releases) and the [RustSec advisory database](https://github.com/RustSec/advisory-db) (i.e. `cargo-audit`). +The project team is committed to transparency in the security issue disclosure process. The Tokio team announces security issues via [project GitHub Release notes](https://github.com/tokio-rs/tokio/releases) and the [RustSec advisory database](https://github.com/RustSec/advisory-db) (i.e. `cargo-audit`). From 1aa56b134d699e3e46325eaa9cb0d273ddc847de Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:32 -0400 Subject: [PATCH 09/23] chore: great_grandchild Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio-util/tests/sync_cancellation_token.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tokio-util/tests/sync_cancellation_token.rs b/tokio-util/tests/sync_cancellation_token.rs index 28ba284b6c2..de8ecc77734 100644 --- a/tokio-util/tests/sync_cancellation_token.rs +++ b/tokio-util/tests/sync_cancellation_token.rs @@ -258,7 +258,7 @@ fn cancel_only_all_descendants() { let child2_token = token.child_token(); let grandchild_token = child1_token.child_token(); let grandchild2_token = child1_token.child_token(); - let grandgrandchild_token = grandchild_token.child_token(); + let great_grandchild_token = grandchild_token.child_token(); assert!(!parent_token.is_cancelled()); assert!(!token.is_cancelled()); @@ -267,7 +267,7 @@ fn cancel_only_all_descendants() { assert!(!child2_token.is_cancelled()); assert!(!grandchild_token.is_cancelled()); assert!(!grandchild2_token.is_cancelled()); - assert!(!grandgrandchild_token.is_cancelled()); + assert!(!great_grandchild_token.is_cancelled()); let parent_fut = parent_token.cancelled(); let fut = token.cancelled(); @@ -276,7 +276,7 @@ fn cancel_only_all_descendants() { let child2_fut = child2_token.cancelled(); let grandchild_fut = grandchild_token.cancelled(); let grandchild2_fut = grandchild2_token.cancelled(); - let grandgrandchild_fut = grandgrandchild_token.cancelled(); + let great_grandchild_fut = great_grandchild_token.cancelled(); pin!(parent_fut); pin!(fut); @@ -285,7 +285,7 @@ fn cancel_only_all_descendants() { pin!(child2_fut); pin!(grandchild_fut); pin!(grandchild2_fut); - pin!(grandgrandchild_fut); + pin!(great_grandchild_fut); assert_eq!( Poll::Pending, @@ -321,7 +321,7 @@ fn cancel_only_all_descendants() { ); assert_eq!( Poll::Pending, - grandgrandchild_fut + great_grandchild_fut .as_mut() .poll(&mut Context::from_waker(&waker)) ); @@ -339,7 +339,7 @@ fn cancel_only_all_descendants() { assert!(child2_token.is_cancelled()); assert!(grandchild_token.is_cancelled()); assert!(grandchild2_token.is_cancelled()); - assert!(grandgrandchild_token.is_cancelled()); + assert!(great_grandchild_token.is_cancelled()); assert_eq!( Poll::Ready(()), @@ -367,7 +367,7 @@ fn cancel_only_all_descendants() { ); assert_eq!( Poll::Ready(()), - grandgrandchild_fut + great_grandchild_fut .as_mut() .poll(&mut Context::from_waker(&waker)) ); From efcc7e32ed00dd4a05ffd77b83379474126d87d5 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:33 -0400 Subject: [PATCH 10/23] chore: handle Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/src/time/driver/tests/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tokio/src/time/driver/tests/mod.rs b/tokio/src/time/driver/tests/mod.rs index 005a2386ae3..fbe000f0f82 100644 --- a/tokio/src/time/driver/tests/mod.rs +++ b/tokio/src/time/driver/tests/mod.rs @@ -291,11 +291,11 @@ fn balanced_incr_and_decr() { let incr_inner = inner.clone(); let decr_inner = inner.clone(); - let incr_hndle = thread::spawn(move || incr(incr_inner)); - let decr_hndle = thread::spawn(move || decr(decr_inner)); + let incr_handle = thread::spawn(move || incr(incr_inner)); + let decr_handle = thread::spawn(move || decr(decr_inner)); - incr_hndle.join().expect("should never fail"); - decr_hndle.join().expect("should never fail"); + incr_handle.join().expect("should never fail"); + decr_handle.join().expect("should never fail"); assert_eq!(inner.num(Ordering::SeqCst), 0); }) From 6000505bc6c6bca01c9a4906c6afe7bde515a650 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 18:52:19 -0400 Subject: [PATCH 11/23] chore: have Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/src/task/local.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/task/local.rs b/tokio/src/task/local.rs index ac77a3571e2..56b652c0d0f 100644 --- a/tokio/src/task/local.rs +++ b/tokio/src/task/local.rs @@ -160,7 +160,7 @@ cfg_rt! { /// tokio::task::spawn_local(run_task(new_task)); /// } /// // If the while loop returns, then all the LocalSpawner - /// // objects have have been dropped. + /// // objects have been dropped. /// }); /// /// // This will return once all senders are dropped and all From 9f2de5dd9958061bbfc70b5f1bf14d9d761fc5b9 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:34 -0400 Subject: [PATCH 12/23] chore: identify Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/src/runtime/metrics/runtime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/runtime/metrics/runtime.rs b/tokio/src/runtime/metrics/runtime.rs index cb0edf52ad8..279d70a0e74 100644 --- a/tokio/src/runtime/metrics/runtime.rs +++ b/tokio/src/runtime/metrics/runtime.rs @@ -131,7 +131,7 @@ impl RuntimeMetrics { /// /// `worker` is the index of the worker being queried. The given value must /// be between 0 and `num_workers()`. The index uniquely identifies a single - /// worker and will continue to indentify the worker throughout the lifetime + /// worker and will continue to identify the worker throughout the lifetime /// of the runtime instance. /// /// # Panics From 12ba4e03de8ce4d18bbd3df04ca41c83d9499fcf Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:34 -0400 Subject: [PATCH 13/23] chore: immediately Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/src/runtime/builder.rs | 2 +- tokio/src/task/local.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio/src/runtime/builder.rs b/tokio/src/runtime/builder.rs index 5ba7b7abfd3..fff1b3ad64b 100644 --- a/tokio/src/runtime/builder.rs +++ b/tokio/src/runtime/builder.rs @@ -738,7 +738,7 @@ impl Builder { /// * `UnhandledPanic::ShutdownRuntime` will force the runtime to /// shutdown immediately when a spawned task panics even if that /// task's `JoinHandle` has not been dropped. All other spawned tasks - /// will immediatetly terminate and further calls to + /// will immediately terminate and further calls to /// [`Runtime::block_on`] will panic. /// /// # Unstable diff --git a/tokio/src/task/local.rs b/tokio/src/task/local.rs index 56b652c0d0f..a5bd1bb8835 100644 --- a/tokio/src/task/local.rs +++ b/tokio/src/task/local.rs @@ -652,7 +652,7 @@ cfg_unstable! { /// * `UnhandledPanic::ShutdownRuntime` will force the `LocalSet` to /// shutdown immediately when a spawned task panics even if that /// task's `JoinHandle` has not been dropped. All other spawned tasks - /// will immediatetly terminate and further calls to + /// will immediately terminate and further calls to /// [`LocalSet::block_on`] and [`LocalSet::run_until`] will panic. /// /// # Panics From a421047c6a4b3b86b4cda310799a72bd52c855b4 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:35 -0400 Subject: [PATCH 14/23] chore: minimum Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7e7585742b..e25a51cde86 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -562,7 +562,7 @@ Tokio ≥1.0.0 comes with LTS guarantees: The goal of these guarantees is to provide stability to the ecosystem. -## Mininum Supported Rust Version (MSRV) +## Minimum Supported Rust Version (MSRV) * All Tokio ≥1.0.0 releases will support at least a 6-month old Rust compiler release. From 4dfde9fa1cca034ab27da31d1747a0776259ad13 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 18:51:37 -0400 Subject: [PATCH 15/23] chore: new Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio-util/tests/framed_write.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio-util/tests/framed_write.rs b/tokio-util/tests/framed_write.rs index 259d9b0c9f3..01d71b2b8b4 100644 --- a/tokio-util/tests/framed_write.rs +++ b/tokio-util/tests/framed_write.rs @@ -130,7 +130,7 @@ fn write_hits_backpressure() { _ => unreachable!(), } - // Push a new new chunk + // Push a new chunk mock.calls.push_back(Ok(b[..].to_vec())); } // 1 'wouldblock', 4 * 2KB buffers, 1 b-byte buffer From 9c600cf54cd43d7b1ab616e15406d1db5b6cd14a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:47:11 -0400 Subject: [PATCH 16/23] spelling: ping-pong Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/tests/rt_common.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/tests/rt_common.rs b/tokio/tests/rt_common.rs index da8dc6e3a09..7ff6ae3f120 100644 --- a/tokio/tests/rt_common.rs +++ b/tokio/tests/rt_common.rs @@ -1137,7 +1137,7 @@ rt_test! { let (spawned_tx, mut spawned_rx) = mpsc::unbounded_channel(); let mut tasks = vec![]; - // Spawn a bunch of tasks that ping ping between each other to + // Spawn a bunch of tasks that ping-pong between each other to // saturate the runtime. for _ in 0..NUM { let (tx1, mut rx1) = mpsc::unbounded_channel(); From 0d9b596141dbda6b56b1cef0fb24980a3f4d28fe Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 18:51:50 -0400 Subject: [PATCH 17/23] chore: preemptively Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/src/runtime/task/mod.rs | 2 +- tokio/src/runtime/task/waker.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio/src/runtime/task/mod.rs b/tokio/src/runtime/task/mod.rs index 56911a731c3..46aa62b14d1 100644 --- a/tokio/src/runtime/task/mod.rs +++ b/tokio/src/runtime/task/mod.rs @@ -369,7 +369,7 @@ cfg_rt_multi_thread! { } impl Task { - /// Pre-emptively cancels the task as part of the shutdown process. + /// Preemptively cancels the task as part of the shutdown process. pub(crate) fn shutdown(self) { let raw = self.raw; mem::forget(self); diff --git a/tokio/src/runtime/task/waker.rs b/tokio/src/runtime/task/waker.rs index 74a29f4a847..a434d5be481 100644 --- a/tokio/src/runtime/task/waker.rs +++ b/tokio/src/runtime/task/waker.rs @@ -13,7 +13,7 @@ pub(super) struct WakerRef<'a, S: 'static> { _p: PhantomData<(&'a Header, S)>, } -/// Returns a `WakerRef` which avoids having to pre-emptively increase the +/// Returns a `WakerRef` which avoids having to preemptively increase the /// refcount if there is no need to do so. pub(super) fn waker_ref(header: &NonNull
) -> WakerRef<'_, S> where From fed28302bcceb53c915b7ddbb0903003cfb51377 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:35 -0400 Subject: [PATCH 18/23] chore: readiness Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/docs/reactor-refactor.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tokio/docs/reactor-refactor.md b/tokio/docs/reactor-refactor.md index 1c9ace15a8f..3005afc0168 100644 --- a/tokio/docs/reactor-refactor.md +++ b/tokio/docs/reactor-refactor.md @@ -188,9 +188,9 @@ readiness, the driver's tick is packed into the atomic `usize`. The `ScheduledIo` readiness `AtomicUsize` is structured as: ``` -| reserved | generation | driver tick | readinesss | -|----------+------------+--------------+------------| -| 1 bit | 7 bits + 8 bits + 16 bits | +| reserved | generation | driver tick | readiness | +|----------+------------+--------------+-----------| +| 1 bit | 7 bits + 8 bits + 16 bits | ``` The `reserved` and `generation` components exist today. From e618c61ab637175a2c91867063662b9035525d54 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 18:56:35 -0400 Subject: [PATCH 19/23] chore: since Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio-test/src/macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio-test/src/macros.rs b/tokio-test/src/macros.rs index 7ca73451f4d..4c029c9e781 100644 --- a/tokio-test/src/macros.rs +++ b/tokio-test/src/macros.rs @@ -260,7 +260,7 @@ macro_rules! assert_err { }}; } -/// Asserts that an exact duration has elapsed since since the start instant ±1ms. +/// Asserts that an exact duration has elapsed since the start instant ±1ms. /// /// ```rust /// use tokio::time::{self, Instant}; From 24060d7550928e3eb3ad11c94e52aebc02583e5a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:36 -0400 Subject: [PATCH 20/23] chore: stress Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .github/workflows/stress-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stress-test.yml b/.github/workflows/stress-test.yml index bcbede18efd..e34e0d54907 100644 --- a/.github/workflows/stress-test.yml +++ b/.github/workflows/stress-test.yml @@ -12,7 +12,7 @@ env: rust_stable: stable jobs: - stess-test: + stress-test: name: Stress Test runs-on: ubuntu-latest strategy: From baddd24637fb03f3f5576d6c2daa22138d1eb47f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:36 -0400 Subject: [PATCH 21/23] chore: stress_test Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/tests/sync_semaphore.rs | 2 +- tokio/tests/sync_semaphore_owned.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio/tests/sync_semaphore.rs b/tokio/tests/sync_semaphore.rs index 72b646539e3..fe5807c8e7e 100644 --- a/tokio/tests/sync_semaphore.rs +++ b/tokio/tests/sync_semaphore.rs @@ -65,7 +65,7 @@ fn forget() { #[tokio::test] #[cfg(feature = "full")] -async fn stresstest() { +async fn stress_test() { let sem = Arc::new(Semaphore::new(5)); let mut join_handles = Vec::new(); for _ in 0..1000 { diff --git a/tokio/tests/sync_semaphore_owned.rs b/tokio/tests/sync_semaphore_owned.rs index 5780c0e10eb..c01add3cacc 100644 --- a/tokio/tests/sync_semaphore_owned.rs +++ b/tokio/tests/sync_semaphore_owned.rs @@ -91,7 +91,7 @@ fn forget() { #[tokio::test] #[cfg(feature = "full")] -async fn stresstest() { +async fn stress_test() { let sem = Arc::new(Semaphore::new(5)); let mut join_handles = Vec::new(); for _ in 0..1000 { From 49b29d4d74298684964ae729e6bafbda443f7635 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:04:37 -0400 Subject: [PATCH 22/23] chore: unmodified Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/src/sync/watch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/sync/watch.rs b/tokio/src/sync/watch.rs index 6866964265c..d4aeb2ef0ec 100644 --- a/tokio/src/sync/watch.rs +++ b/tokio/src/sync/watch.rs @@ -665,7 +665,7 @@ impl Sender { /// /// The `modify` closure must return `true` if the value has actually /// been modified during the mutable borrow. It should only return `false` - /// if the value is guaranteed to be unnmodified despite the mutable + /// if the value is guaranteed to be unmodified despite the mutable /// borrow. /// /// Receivers are only notified if the closure returned `true`. If the From d70ea042062ec107c935f8c7c4634381e8f5815c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 24 Jul 2022 18:53:02 -0400 Subject: [PATCH 23/23] chore: were Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- tokio/src/time/interval.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/time/interval.rs b/tokio/src/time/interval.rs index 0fe420fce8c..82c21709459 100644 --- a/tokio/src/time/interval.rs +++ b/tokio/src/time/interval.rs @@ -278,7 +278,7 @@ pub enum MissedTickBehavior { /// // 50ms after the call to `tick` up above. That is, in `tick`, when we /// // recognize that we missed a tick, we schedule the next tick to happen /// // 50ms (or whatever the `period` is) from right then, not from when - /// // were were *supposed* to tick + /// // were *supposed* to tick /// interval.tick().await; /// # } /// ```