Split out a foreground and background executor

This commit is contained in:
Nathan Sobo
2023-11-01 13:53:45 -06:00
parent dd1a2a9e44
commit 11b6d9e33a
26 changed files with 165 additions and 150 deletions
+4 -1
View File
@@ -63,7 +63,10 @@ pub fn handle_settings_file_changes(
mut user_settings_file_rx: mpsc::UnboundedReceiver<String>,
cx: &mut AppContext,
) {
let user_settings_content = cx.executor().block(user_settings_file_rx.next()).unwrap();
let user_settings_content = cx
.background_executor()
.block(user_settings_file_rx.next())
.unwrap();
cx.update_global(|store: &mut SettingsStore, cx| {
store
.set_user_settings(&user_settings_content, cx)