Skip to main content

drain_task

Function drain_task 

Source
pub fn drain_task(
    tx: ConsoleTxAsync<'static>,
) -> Result<SpawnToken<impl Sized>, SpawnError>
Expand description

The single console writer: pulls contiguous slices from the ring and writes them via the target’s async TX sink. write_all().await parks on the TX-done IRQ when the FIFO is full — no spin, no interrupts-off, no cross-core contention. When the ring is empty, awaits [DRAIN_SIGNAL] (woken by every producer write). Spawn once from the binary’s main (fire27: pass tx.into_async(); cores3: the split TX is already async).