diff options
author | Carl Lerche <me@carllerche.com> | 2019-11-04 22:22:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-04 22:22:40 -0800 |
commit | a6253ed05a1e0d14bc64915f5937c29092df9497 (patch) | |
tree | 15c96ca9b66e5bca424769e8c715f732feaa1b1c /tokio/src/executor/thread_pool/builder.rs | |
parent | 94f9b04b066cfc3da5c3ee2c961c21a9496135dd (diff) |
chore: unify all mocked `loom` files (#1732)
When the crates were merged, each component kept its own `loom` file
containing mocked types it needed. This patch unifies them all in one
location.
Diffstat (limited to 'tokio/src/executor/thread_pool/builder.rs')
-rw-r--r-- | tokio/src/executor/thread_pool/builder.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tokio/src/executor/thread_pool/builder.rs b/tokio/src/executor/thread_pool/builder.rs index f9d40350..c1b1ed19 100644 --- a/tokio/src/executor/thread_pool/builder.rs +++ b/tokio/src/executor/thread_pool/builder.rs @@ -1,8 +1,7 @@ -use crate::executor::loom::sync::Arc; -use crate::executor::loom::sys::num_cpus; -use crate::executor::loom::thread; use crate::executor::park::Park; use crate::executor::thread_pool::{shutdown, worker, worker::Worker, Spawner, ThreadPool}; +use crate::loom::sync::Arc; +use crate::loom::sys::num_cpus; use std::{fmt, usize}; @@ -109,7 +108,7 @@ impl Builder { impl Drop for AbortOnPanic { fn drop(&mut self) { - if thread::panicking() { + if std::thread::panicking() { eprintln!("[ERROR] unhandled panic in Tokio scheduler. This is a bug and should be reported."); std::process::abort(); } |