Function transportation::run_in_thread[][src]

pub fn run_in_thread(
    thread_id: ThreadId,
    callback: impl Fn() + Send + 'static
) -> Result<(), ()>

Run a callback in a remote thread that is owned by transportation. Spins until the remote thread calls run or run_worker. May deadlock if the remote thread doesn't enter the transportation event loop. May return Err(()) if the remote thread has terminated.