Fix hangs in new dispatcher

Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2023-11-01 17:11:42 -07:00
parent 90facc051a
commit 6ee93125d0
11 changed files with 93 additions and 44 deletions

View file

@ -165,10 +165,10 @@ pub struct MacPlatformState {
impl MacPlatform {
pub fn new() -> Self {
let dispatcher = Arc::new(MacDispatcher);
let dispatcher = Arc::new(MacDispatcher::new());
Self(Mutex::new(MacPlatformState {
background_executor: BackgroundExecutor::new(dispatcher.clone()),
foreground_executor: ForegroundExecutor::new(dispatcher.clone()),
foreground_executor: ForegroundExecutor::new(dispatcher),
text_system: Arc::new(MacTextSystem::new()),
display_linker: MacDisplayLinker::new(),
pasteboard: unsafe { NSPasteboard::generalPasteboard(nil) },