дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
fix(app): close a project window without blocking the UI thread (#1610)
close_project was a synchronous command, so it ran on the UI thread and dropped the project there: stopping its file watcher and index worker waits for the batch of file events they are applying, many while a build or rust-analyzer writes output. The command now runs off the main thread, and the project is dropped on the project shutdown thread, which a project opened next still waits for (the index database is released first). The window Destroyed path gets the same.
Цей коміт міститься в:
1 джерело
844cc93b90
коміт
1dda103bf0
2 files changed
+46
-1
No files matched your search
@@ -129,7 +129,8 @@ pub fn project_rename(window: Window, state: State<'_, AppState>, name: String)
|
||||
Ok(project_info(&project))
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
// Not on the main thread: closing stops the project's language servers, runs and file watcher.
|
||||
#[tauri::command(async)]
|
||||
#[specta::specta]
|
||||
pub fn close_project(window: Window, state: State<'_, AppState>) {
|
||||
crate::windows::close_auxiliary_windows(window.app_handle(), window.label());
|
||||
|
||||
Reference in new issue
Заблокувати користувача