pub fn execute_on_main_thread<F: Fn() + 'static>(
f: F,
) -> Option<Ref<MainThreadAction>>Expand description
Execute passed function on the main thread. Returns None if already running on the main thread.
When not running in headless this will block the UI.