MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / async_wake_callback

Function async_wake_callback

frontend/wrapper/src/helpers.rs:113–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111 // If the editor cannot be borrowed then it has encountered a panic - we should just ignore new dispatches
112 });
113}
114
115/// Web wake callback: queues a microtask that dispatches [`FutureMessage::Wake`].
116#[cfg(all(not(feature = "native"), target_family = "wasm"))]
117pub(crate) fn async_wake_callback() -> Wake {
118 use std::sync::Arc;
119 Arc::new(|| {
120 wasm_bindgen_futures::spawn_local(async {
121 wrapper(|wrapper| wrapper.dispatch(FutureMessage::Wake));
122 });
123 })

Callers 1

createMethod · 0.85

Calls 2

wrapperFunction · 0.85
dispatchMethod · 0.45

Tested by

no test coverage detected