(&mut self)
| 1382 | ) -> Result<(), (ContextToProcessorMsg, UpdateError)> { |
| 1383 | self.to_processor_tx |
| 1384 | .try_push(msg) |
| 1385 | .map_err(|msg| (msg, UpdateError::MsgChannelFull)) |
| 1386 | } |
| 1387 | } |
| 1388 | |
| 1389 | impl 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 | } |
nothing calls this directly
no test coverage detected