pub trait PlatformDispatcher: Send + Sync {
    // Required methods
    fn is_main_thread(&self) -> bool;
    fn dispatch(&self, runnable: Runnable, label: Option<TaskLabel>);
    fn dispatch_on_main_thread(&self, runnable: Runnable);
    fn dispatch_after(&self, duration: Duration, runnable: Runnable);
    fn tick(&self, background_only: bool) -> bool;
    fn park(&self);
    fn unparker(&self) -> Unparker;
}

Required Methods§

source

fn is_main_thread(&self) -> bool

source

fn dispatch(&self, runnable: Runnable, label: Option<TaskLabel>)

source

fn dispatch_on_main_thread(&self, runnable: Runnable)

source

fn dispatch_after(&self, duration: Duration, runnable: Runnable)

source

fn tick(&self, background_only: bool) -> bool

source

fn park(&self)

source

fn unparker(&self) -> Unparker

Implementors§