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] #[tauri::command]
pub fn run_program(path: String) { pub fn run_program(path: String) {
// Open the program from the specified path. // Open in new thread to prevent blocking.
open::that(&path).unwrap(); thread::spawn(move || {
open::that(&path).unwrap();
});
} }
#[tauri::command] #[tauri::command]