Skip to main content

CTX

Static CTX 

Source
pub static CTX: OnceLock<Context>
Expand description

A global holder for the egui::Context, used to request repaints from background tasks.

This is initialized once by EguiAsyncPlugin.

Not available on threaded WASM (wasm32 with the atomics target feature), where egui::Context is neither Send nor Sync. There, the context is kept in a thread-local on the thread that runs the plugin instead.