Skip to main content

WakeFn

Type Alias WakeFn 

Source
pub type WakeFn = Arc<dyn Fn() + Send + Sync>;
Available on not (WebAssembly and target feature atomics).
Expand description

Callback run after every publish, for an idle UI to come and collect the snapshot.

Without it a publish while the UI is idle, like a single step or the final one after pause, sits unread until some unrelated input event wakes the event loop. The callback must not block.

Aliased Typeยง

pub struct WakeFn { /* private fields */ }