Function esp32_simple::thread::spawn

source ·
pub fn spawn<F, T>(f: F) -> JoinHandle<T>
where F: FnOnce() -> T + Send + 'static, T: Send + 'static,
Expand description

Spawns a new thread with a failure guard.

§Arguments

  • f - A closure to execute in the new thread.

§Returns

A JoinHandle for the spawned thread.

§Type Parameters

  • F - The type of the closure.
  • T - The return type of the closure.