fix: #3227, use async operations to avoid blocking on

This commit is contained in:
wonfen
2025-04-01 12:52:59 +08:00
parent 30ea408019
commit 7b5fd104de
4 changed files with 50 additions and 41 deletions

View File

@@ -23,7 +23,7 @@ static APP_START_TIME: Lazy<AtomicI64> = Lazy::new(|| {
#[tauri::command]
pub async fn export_diagnostic_info() -> CmdResult<()> {
let sysinfo = PlatformSpecification::new();
let sysinfo = PlatformSpecification::new_async().await;
let info = format!("{:?}", sysinfo);
let app_handle = handle::Handle::global().app_handle().unwrap();
@@ -36,7 +36,7 @@ pub async fn export_diagnostic_info() -> CmdResult<()> {
#[tauri::command]
pub async fn get_system_info() -> CmdResult<String> {
let sysinfo = PlatformSpecification::new();
let sysinfo = PlatformSpecification::new_async().await;
let info = format!("{:?}", sysinfo);
Ok(info)
}