docs(wasapi): explain fallible teardown diagnostics
This commit is contained in:
parent
949c287769
commit
8aa24a369b
1 changed files with 3 additions and 1 deletions
|
|
@ -176,7 +176,9 @@ impl Stream {
|
||||||
impl Drop for Stream {
|
impl Drop for Stream {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn drop(&mut self) {
|
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) {
|
if let Err(error) = self.push_command(Command::Terminate) {
|
||||||
let _ = writeln!(
|
let _ = writeln!(
|
||||||
io::stderr().lock(),
|
io::stderr().lock(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue