diff --git a/crates/gpui/src/executor.rs b/crates/gpui/src/executor.rs index aaf56bb74f10cfbb2ba0e37a944e1593f3943b3f..33426c58442e4c8be58fb686a3f3c9489584f6cc 100644 --- a/crates/gpui/src/executor.rs +++ b/crates/gpui/src/executor.rs @@ -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 { &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`].