Skip to main content

guard_block

Function guard_block 

Source
fn guard_block(panicked: &AtomicBool, input: &str, body: impl FnOnce())
Expand description

Run one audio-callback block with its panic caught.

cpal calls this body from its own frame, so an unwind out of it crosses the FFI boundary and aborts the process as rust_foreign_exception - the signature in #2426’s report. This is the one guard that can stop that crossing; after it the capture delivers nothing more, and the log names the loss once, with the input and the backtrace taken at the raise.