Function devices::virtio::snd::common_backend::run_worker_once
source · fn run_worker_once(
ex: &Executor,
streams: &Rc<RwLock<Vec<RwLock<StreamInfo>>>>,
snd_data: &SndData,
f_kill: &mut (impl FusedFuture<Output = Result<()>> + Unpin),
f_resample: &mut (impl FusedFuture<Output = Result<()>> + Unpin),
ctrl_queue: Rc<RwLock<Queue>>,
ctrl_queue_evt: &mut EventAsync,
tx_queue: Rc<RwLock<Queue>>,
tx_queue_evt: &EventAsync,
tx_send: UnboundedSender<PcmResponse>,
tx_recv: &mut UnboundedReceiver<PcmResponse>,
rx_queue: Rc<RwLock<Queue>>,
rx_queue_evt: &EventAsync,
rx_send: UnboundedSender<PcmResponse>,
rx_recv: &mut UnboundedReceiver<PcmResponse>,
card_index: usize
) -> LoopState
Expand description
Runs all workers once and exit if any worker exit.
Returns LoopState::Break
if the worker f_kill
or f_resample
exit, or something went
wrong on shutdown process. The caller should not run the worker again and should exit the main
loop.
If this function returns LoopState::Continue
, the caller can continue the main loop by
resetting the streams and run the worker again.