summaryrefslogtreecommitdiffstats
path: root/tokio/src/runtime/spawner.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/runtime/spawner.rs')
-rw-r--r--tokio/src/runtime/spawner.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/tokio/src/runtime/spawner.rs b/tokio/src/runtime/spawner.rs
index 28ff7c04..a37c6679 100644
--- a/tokio/src/runtime/spawner.rs
+++ b/tokio/src/runtime/spawner.rs
@@ -1,25 +1,25 @@
-cfg_rt_core! {
+cfg_rt! {
use crate::runtime::basic_scheduler;
use crate::task::JoinHandle;
use std::future::Future;
}
-cfg_rt_threaded! {
+cfg_rt_multi_thread! {
use crate::runtime::thread_pool;
}
#[derive(Debug, Clone)]
pub(crate) enum Spawner {
- #[cfg(feature = "rt-core")]
+ #[cfg(feature = "rt")]
Basic(basic_scheduler::Spawner),
- #[cfg(feature = "rt-threaded")]
+ #[cfg(feature = "rt-multi-thread")]
ThreadPool(thread_pool::Spawner),
}
impl Spawner {
pub(crate) fn shutdown(&mut self) {
- #[cfg(feature = "rt-threaded")]
+ #[cfg(feature = "rt-multi-thread")]
{
if let Spawner::ThreadPool(spawner) = self {
spawner.shutdown();
@@ -28,7 +28,7 @@ impl Spawner {
}
}
-cfg_rt_core! {
+cfg_rt! {
impl Spawner {
pub(crate) fn spawn<F>(&self, future: F) -> JoinHandle<F::Output>
where
@@ -36,9 +36,9 @@ cfg_rt_core! {
F::Output: Send + 'static,
{
match self {
- #[cfg(feature = "rt-core")]
+ #[cfg(feature = "rt")]
Spawner::Basic(spawner) => spawner.spawn(future),
- #[cfg(feature = "rt-threaded")]
+ #[cfg(feature = "rt-multi-thread")]
Spawner::ThreadPool(spawner) => spawner.spawn(future),
}
}