re-threadify program launching

This commit is contained in:
SpikeHD
2022-07-12 12:28:31 -07:00
committed by GitHub
parent b3585927ca
commit 33c67eef06

View File

@@ -4,8 +4,10 @@ use crate::file_helpers;
#[tauri::command]
pub fn run_program(path: String) {
// Open the program from the specified path.
open::that(&path).unwrap();
// Open in new thread to prevent blocking.
thread::spawn(move || {
open::that(&path).unwrap();
});
}
#[tauri::command]