From b5b17e76e28af605920bf293d1db75022ed74737 Mon Sep 17 00:00:00 2001 From: Igor Erin Date: Fri, 28 Feb 2025 15:21:47 +0300 Subject: [PATCH] rt: todo tag for spelling check --- tokio/src/runtime/builder.rs | 4 ++-- tokio/src/runtime/metrics/runtime.rs | 2 +- .../runtime/scheduler/multi_thread/worker.rs | 24 +++++++++---------- tokio/src/runtime/tests/queue.rs | 6 ++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tokio/src/runtime/builder.rs b/tokio/src/runtime/builder.rs index a3cfd38c9ee..36d2e24b743 100644 --- a/tokio/src/runtime/builder.rs +++ b/tokio/src/runtime/builder.rs @@ -64,7 +64,7 @@ pub struct Builder { /// Only used when not using the current-thread executor. worker_threads: Option, - /// TODO(i.erin) + /// TODO(i.Erin) worker_group: usize, /// Cap on thread usage. @@ -433,7 +433,7 @@ impl Builder { self } - /// TODO(i.erin) + /// TODO(i.Erin) pub fn worker_group(&mut self, val: usize) -> &mut Self { assert!(val > 0, "Worker groups cannot be set to 0"); self.worker_group = val; diff --git a/tokio/src/runtime/metrics/runtime.rs b/tokio/src/runtime/metrics/runtime.rs index 14a8a4629de..85b9a32ad0e 100644 --- a/tokio/src/runtime/metrics/runtime.rs +++ b/tokio/src/runtime/metrics/runtime.rs @@ -87,7 +87,7 @@ impl RuntimeMetrics { /// #[tokio::main] /// async fn main() { /// let metrics = Handle::current().metrics(); - /// // TODO(i.erin) + /// // TODO(i.Erin) /// let n = metrics.global_queue_depth(0); /// println!("{} tasks currently pending in the runtime's global queue", n); /// } diff --git a/tokio/src/runtime/scheduler/multi_thread/worker.rs b/tokio/src/runtime/scheduler/multi_thread/worker.rs index 98eecd26da7..7cfe4a5d6cd 100644 --- a/tokio/src/runtime/scheduler/multi_thread/worker.rs +++ b/tokio/src/runtime/scheduler/multi_thread/worker.rs @@ -95,10 +95,10 @@ pub(super) struct Worker { /// Index holding this worker's remote state index: usize, - /// TODO(i.erin) ask about locallity + /// TODO(i.Erin) ask about locallity group: usize, - // TODO(i.erin) index within group (field or compute this?) + // TODO(i.Erin) index within group (field or compute this?) local_index: usize, /// Used to hand-off a worker's core to another thread. @@ -164,10 +164,10 @@ pub(crate) struct Shared { /// 2. Submit work to the scheduler when a worker run queue is saturated pub(super) injects: Box<[inject::Inject>]>, - /// TODO(i.erin) only for reading + /// TODO(i.Erin) only for reading group_size: usize, - //TODO(i.erin) only for reading + //TODO(i.Erin) only for reading ngroup: usize, /// Coordinates idle workers groups @@ -564,7 +564,7 @@ impl Context { // We consumed all work in the group queues and will start searching for work. core.stats.end_processing_scheduled_tasks(); // There is no more **local** work to process, try to steal work - // from other workers within group TODO(i.erin). + // from other workers within group TODO(i.Erin). if let Some(task) = core.steal_work(&self.worker) { // Found work, switch back to processing core.stats.start_processing_scheduled_tasks(); @@ -573,7 +573,7 @@ impl Context { } // Fallback for search over group bounderies. - // Process like local stealing --- we should use local stealing practices TODO(i.erin) + // Process like local stealing --- we should use local stealing practices TODO(i.Erin) if let Some(task) = core.steal_remote_work(&self.worker) { core.stats.start_processing_scheduled_tasks(); core = self.run_task(task, core)?; @@ -856,10 +856,10 @@ impl Core { fn steal_remote_work(&mut self, worker: &Worker) -> Option { for group in worker.handle.random_groups() { let inject = &worker.handle.shared.injects[group]; - // TODO(i.erin) we may want to find bigger queue + // TODO(i.Erin) we may want to find bigger queue // or ask user for hot queue if !inject.is_empty() { - // TODO(i.erin) split somehow better + // TODO(i.Erin) split somehow better return self.take_n_from_inject(worker.handle.shared.ngroup, inject); } } @@ -935,7 +935,7 @@ impl Core { } } - // TODO(i.erin) which queu to check? why here? + // TODO(i.Erin) which queu to check? why here? // Fallback on checking the global queue worker.handle.next_remote_task(Some(worker.group)) } @@ -1158,7 +1158,7 @@ impl Handle { if let Some(prev) = prev { core.run_queue - // TODO(i.erin) explicit group structure to specify overflow + // TODO(i.Erin) explicit group structure to specify overflow .push_back_or_overflow(prev, group, self, &mut core.stats); } @@ -1205,7 +1205,7 @@ impl Handle { } fn push_remote_task(&self, group: Option, task: Notified) { - // TODO(i.erin) inc certain remote schedule + // TODO(i.Erin) inc certain remote schedule self.shared.scheduler_metrics.inc_remote_schedule_count(); let group = group.unwrap_or_else(|| self.random_groups().next().unwrap()); @@ -1290,7 +1290,7 @@ impl Handle { // Drain the injection queue // // We already shut down every task, so we can simply drop the tasks. - // TODO(i.erin) smarter choose tasks + // TODO(i.Erin) smarter choose tasks while let Some(task) = self.next_remote_task(None) { drop(task); } diff --git a/tokio/src/runtime/tests/queue.rs b/tokio/src/runtime/tests/queue.rs index 65a38e269ba..8005bb8fba4 100644 --- a/tokio/src/runtime/tests/queue.rs +++ b/tokio/src/runtime/tests/queue.rs @@ -36,7 +36,7 @@ fn fits_256_one_at_a_time() { let mut stats = new_stats(); for _ in 0..256 { - // TODO(i.erin) + // TODO(i.Erin) let (task, _) = super::unowned(async {}); local.push_back_or_overflow(task, 0, &inject, &mut stats); } @@ -125,7 +125,7 @@ fn steal_batch() { for _ in 0..4 { let (task, _) = super::unowned(async {}); - // TODO(i.erin) + // TODO(i.Erin) local1.push_back_or_overflow(task, 0, &inject, &mut stats); } @@ -200,7 +200,7 @@ fn stress1() { for nlocal in 0..NUM_LOCAL { for npush in 0..NUM_PUSH { let (task, _) = super::unowned(async {}); - // TODO(i.erin) + // TODO(i.Erin) let group = (nlocal * npush) % n_shards; local.push_back_or_overflow(task, group, &inject, &mut stats); }