Skip to main content

main_thread_available

Function main_thread_available 

Source
pub fn main_thread_available() -> bool
Expand description

Reports whether this target has an established main thread to dispatch to.

Apple and web targets always do. Android needs [register_android_main_thread], and the polyfill needs polyfill::executor::start_main_executor.