Skip to main content

spawn_named

Function spawn_named 

Source
pub fn spawn_named<T, F>(name: &str, f: F) -> Option<JoinHandle<T>>
where F: FnOnce() -> T + Send + 'static, T: Send + 'static,
Expand description

Spawn f on a named thread. On failure (e.g. PID/thread limit), log a warning and return None so callers can fall back to inline work or skip the feature.