Constant RUNTIME_INBOX_DRAIN_BUDGET

Source
pub const RUNTIME_INBOX_DRAIN_BUDGET: usize = 256;
Expand description

Maximum number of mailbox messages applied during one host callback.

A bounded drain prevents unbounded producer traffic from monopolizing the UI thread. The 257th observed message is prefetched and retained for the next callback.

ยงExamples

use ailloli_ui_runtime::app::RUNTIME_INBOX_DRAIN_BUDGET;
assert_eq!(RUNTIME_INBOX_DRAIN_BUDGET, 256);