MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / drop

Method drop

crates/firewheel-graph/src/context.rs:1384–1400  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1382 ) -> Result<(), (ContextToProcessorMsg, UpdateError)> {
1383 self.to_processor_tx
1384 .try_push(msg)
1385 .map_err(|msg| (msg, UpdateError::MsgChannelFull))
1386 }
1387}
1388
1389impl Drop for FirewheelContext {
1390 fn drop(&mut self) {
1391 // Wait for the processor to be drop to avoid deallocating it on
1392 // the audio thread.
1393 #[cfg(not(target_family = "wasm"))]
1394 let _ = self.deactivate_blocking(core::time::Duration::from_secs(3));
1395
1396 #[cfg(target_family = "wasm")]
1397 self.request_deactivate();
1398
1399 // Make sure all node processors are dropped before node states in
1400 // order to be compatible with CLAP plugin hosting.
1401 if let Some(p) = &mut self.processor_drop_rx {
1402 p.clear();
1403 }

Callers

nothing calls this directly

Calls 2

deactivate_blockingMethod · 0.80
request_deactivateMethod · 0.80

Tested by

no test coverage detected