From 8aa24a369b23b20ebf7b477c9a6d96b5638adc07 Mon Sep 17 00:00:00 2001 From: fufesou Date: Sat, 12 Sep 2026 22:49:41 +0800 Subject: [PATCH] docs(wasapi): explain fallible teardown diagnostics --- src/host/wasapi/stream.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/host/wasapi/stream.rs b/src/host/wasapi/stream.rs index c3d27ec..95255d8 100644 --- a/src/host/wasapi/stream.rs +++ b/src/host/wasapi/stream.rs @@ -176,7 +176,9 @@ impl Stream { impl Drop for Stream { #[inline] fn drop(&mut self) { - // Diagnostic I/O must not interrupt worker and handle cleanup. + // eprintln! panics on stderr write errors, e.g. a closed pipe reporting + // ERROR_NO_DATA (232), which Rust maps to BrokenPipe. Ignore diagnostic + // I/O errors so worker joining and handle cleanup still run. if let Err(error) = self.push_command(Command::Terminate) { let _ = writeln!( io::stderr().lock(),