From 33c67eef06e4c85a07d329edadac8d6572920a35 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Tue, 12 Jul 2022 12:28:31 -0700 Subject: [PATCH] re-threadify program launching --- src-tauri/src/system_helpers.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/system_helpers.rs b/src-tauri/src/system_helpers.rs index d3ed2e8..b316fca 100644 --- a/src-tauri/src/system_helpers.rs +++ b/src-tauri/src/system_helpers.rs @@ -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]