@@ -14,7 +14,7 @@ use std::{
};
use util::TryFutureExt;
-pub use scheduler::{FallibleTask, Priority};
+pub use scheduler::{FallibleTask, ForegroundExecutor as SchedulerForegroundExecutor, Priority};
/// A pointer to the executor that is currently running,
/// for spawning background tasks.
@@ -477,6 +477,11 @@ impl ForegroundExecutor {
pub fn dispatcher(&self) -> &Arc<dyn PlatformDispatcher> {
&self.dispatcher
}
+
+ #[doc(hidden)]
+ pub fn scheduler_executor(&self) -> SchedulerForegroundExecutor {
+ self.inner.clone()
+ }
}
/// Scope manages a set of tasks that are enqueued and waited on together. See [`BackgroundExecutor::scoped`].