diff options
| author | Celina G. Val <celinval@amazon.com> | 2025-06-11 12:32:09 -0700 |
|---|---|---|
| committer | Celina G. Val <celinval@amazon.com> | 2025-06-11 16:56:01 -0700 |
| commit | f52c6eee02fb9a9cfe203ce95c4968c2835c034b (patch) | |
| tree | 93d6b6f10a357b37cd68911f6f4b049ccbec5fd8 /compiler/rustc_thread_pool/src/thread_pool | |
| parent | 4aa62ea9e9015621969a0f505abf7a6894e99e9e (diff) | |
| download | rust-f52c6eee02fb9a9cfe203ce95c4968c2835c034b.tar.gz rust-f52c6eee02fb9a9cfe203ce95c4968c2835c034b.zip | |
Another round of tidy / warning fixes
Diffstat (limited to 'compiler/rustc_thread_pool/src/thread_pool')
| -rw-r--r-- | compiler/rustc_thread_pool/src/thread_pool/mod.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_thread_pool/src/thread_pool/mod.rs b/compiler/rustc_thread_pool/src/thread_pool/mod.rs index c8644ecf9a9..3294e2a77cb 100644 --- a/compiler/rustc_thread_pool/src/thread_pool/mod.rs +++ b/compiler/rustc_thread_pool/src/thread_pool/mod.rs @@ -14,7 +14,7 @@ use crate::{ Scope, ScopeFifo, ThreadPoolBuildError, ThreadPoolBuilder, join, scope, scope_fifo, spawn, }; -mod test; +mod tests; /// Represents a user created [thread-pool]. /// @@ -28,7 +28,7 @@ mod test; /// ## Creating a ThreadPool /// /// ```rust -/// # use rustc_thred_pool as rayon; +/// # use rustc_thread_pool as rayon; /// let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap(); /// ``` /// @@ -88,10 +88,10 @@ impl ThreadPool { /// meantime. For example /// /// ```rust - /// # use rustc_thred_pool as rayon; + /// # use rustc_thread_pool as rayon; /// fn main() { /// rayon::ThreadPoolBuilder::new().num_threads(1).build_global().unwrap(); - /// let pool = rustc_thred_pool::ThreadPoolBuilder::default().build().unwrap(); + /// let pool = rustc_thread_pool::ThreadPoolBuilder::default().build().unwrap(); /// let do_it = || { /// print!("one "); /// pool.install(||{}); @@ -123,7 +123,7 @@ impl ThreadPool { /// ## Using `install()` /// /// ```rust - /// # use rustc_thred_pool as rayon; + /// # use rustc_thread_pool as rayon; /// fn main() { /// let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap(); /// let n = pool.install(|| fib(20)); @@ -172,7 +172,7 @@ impl ThreadPool { /// # Examples /// /// ``` - /// # use rustc_thred_pool as rayon; + /// # use rustc_thread_pool as rayon; /// use std::sync::atomic::{AtomicUsize, Ordering}; /// /// fn main() { @@ -401,7 +401,7 @@ impl ThreadPool { } pub(crate) fn wait_until_stopped(self) { - let registry = self.registry.clone(); + let registry = Arc::clone(&self.registry); drop(self); registry.wait_until_stopped(); } |
