Function executors::try_execute_locally[][src]

pub fn try_execute_locally<F>(f: F) -> Result<(), F> where
    F: FnOnce() + Send + 'static, 

Tries run the job on the same executor that spawned the thread running the job.

This is not supported on all executor implementations, and will return Err variant with the original job if it can’t be scheduled.