Skip to main content

Module wake

Module wake 

Source
Expand description

Coalesced wake bridge implementing std::task::Wake for async app tasks and background network/pairing workers, with synchronized callback teardown so hosts can safely free wake callback contexts immediately after clear_sink() / set_wake_callback(NULL) / destroy().

Structs§

AppWake
An app’s async-task waker: a WakeBridge::detachable_waker plus its bridge, re-targetable to the runtime’s single bridge via Self::install. Every in-process app frontend (ReactiveRuntimeApp, NvAppAdapter) polls its tasks with Self::waker, so a task woken off-dispatch (a timer, a fetch) triggers the host’s frame request.
WakeBridge
Coalesced cross-thread wake notifier shared by in-process async frontends (ReactiveRuntimeApp), background workers, and the C ABI set_wake_callback hook.
WakeDeferGuard
RAII deferral guard that postpones synchronous WakeCallback invocations while a surface write lock is held, flushing one coalesced wake strictly after the outermost guard drops.
WakeToken
RAII lifetime token paired with a Waker created by WakeBridge::detachable_waker.

Type Aliases§

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