mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 08:04:52 +01:00
use thread properly lol
This commit is contained in:
@@ -5,7 +5,7 @@ use crate::file_helpers;
|
|||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub fn run_program(path: String) {
|
pub fn run_program(path: String) {
|
||||||
// Open in new thread to prevent blocking.
|
// Open in new thread to prevent blocking.
|
||||||
thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
open::that(&path).unwrap();
|
open::that(&path).unwrap();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user