Miniprofiler (#42385)
Release Notes: - Added hang detection and a built in performance profiler
This commit is contained in:
@@ -12,7 +12,7 @@ mod session;
|
||||
use std::{sync::Arc, time::Duration};
|
||||
|
||||
use async_dispatcher::{Dispatcher, Runnable, set_dispatcher};
|
||||
use gpui::{App, PlatformDispatcher};
|
||||
use gpui::{App, PlatformDispatcher, RunnableVariant};
|
||||
use project::Fs;
|
||||
pub use runtimelib::ExecutionState;
|
||||
|
||||
@@ -45,11 +45,13 @@ fn zed_dispatcher(cx: &mut App) -> impl Dispatcher {
|
||||
// other crates in Zed.
|
||||
impl Dispatcher for ZedDispatcher {
|
||||
fn dispatch(&self, runnable: Runnable) {
|
||||
self.dispatcher.dispatch(runnable, None)
|
||||
self.dispatcher
|
||||
.dispatch(RunnableVariant::Compat(runnable), None);
|
||||
}
|
||||
|
||||
fn dispatch_after(&self, duration: Duration, runnable: Runnable) {
|
||||
self.dispatcher.dispatch_after(duration, runnable);
|
||||
self.dispatcher
|
||||
.dispatch_after(duration, RunnableVariant::Compat(runnable));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user