pub trait Spawner {
// Required method
fn spawn<F>(&self, f: F)
where F: FnOnce() + Send + 'static;
}Expand description
A trait for spawning threads.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Spawner for ThreadPool
Available on crate feature threadpool only.
impl Spawner for ThreadPool
Available on crate feature
threadpool only.