Skip to main content

TaskRunner

Trait TaskRunner 

Source
pub trait TaskRunner: 'static {
    // Required method
    fn run(&self, job: Box<dyn FnOnce() + Send>, cx: &App) -> Task<()>;
}
Expand description

Runs the view’s background jobs (projection rebuilds and compactions).

The default, BackgroundRunner, uses GPUI’s background executor. InlineRunner runs jobs on the calling thread, for platforms without background threads (WebAssembly without SharedArrayBuffer).

Required Methods§

Source

fn run(&self, job: Box<dyn FnOnce() + Send>, cx: &App) -> Task<()>

Runs job; the returned task completes when it is done.

Implementors§