Skip to main content

WakeCallback

Type Alias WakeCallback 

Source
pub type WakeCallback = Arc<dyn Fn() + Send + Sync>;
Expand description

Shared callback invoked when a surface needs the host event loop to schedule a tick.

§Re-entrancy Contract

Installed callbacks MUST be lightweight and strictly non-re-entrant (e.g. post a message or signal a semaphore to the host event loop). They MUST NOT synchronously invoke set_sink, clear_sink, SurfaceRuntime::destroy, or mutating runtime methods on the same thread.

Aliased Type§

pub struct WakeCallback { /* private fields */ }