Add AsyncHandler for wrapping task spawning

This commit is contained in:
Tunglies
2025-04-11 17:27:56 +08:00
parent 644fdc071f
commit b6a6f5f434
12 changed files with 82 additions and 52 deletions

View File

@@ -5,6 +5,7 @@ use crate::{
core::*,
logging, logging_error,
module::lightweight,
process::AsyncHandler,
utils::{error, init, logging::Type, server},
wrap_err,
};
@@ -211,7 +212,7 @@ pub fn create_window(is_showup: bool) {
// 标记前端UI已准备就绪向前端发送启动完成事件
let app_handle_clone = app_handle.clone();
tauri::async_runtime::spawn(async move {
AsyncHandler::spawn(move || async move {
use tauri::Emitter;
logging!(info, Type::Window, true, "UI gets ready.");