Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Expose the scheduler executor for ex (#48854)
Conrad Irwinda8a611113e9
diff --git a/crates/gpui/src/executor.rs b/crates/gpui/src/executor.rsindex aaf56bb74f1..33426c58442 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<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`].