We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bdc406 commit df21ffcCopy full SHA for df21ffc
2 files changed
.changes/command-message-blocking.md
@@ -0,0 +1,5 @@
1
+---
2
+"tauri": patch
3
4
+
5
+Fixes child processes messages not arriving until the subprocess is terminated.
core/tauri/src/endpoints/shell.rs
@@ -102,8 +102,9 @@ impl Cmd {
102
let pid = child.pid();
103
command_childs().lock().unwrap().insert(pid, child);
104
105
- crate::async_runtime::spawn(async move {
106
- while let Some(event) = rx.recv().await {
+ // TODO: for some reason using `crate::async_runtime::spawn` and `rx.recv().await` doesn't work here, see issue #1935
+ std::thread::spawn(move || {
107
+ while let Some(event) = rx.blocking_recv() {
108
if matches!(event, crate::api::process::CommandEvent::Terminated(_)) {
109
command_childs().lock().unwrap().remove(&pid);
110
}
0 commit comments