pub(crate) struct Spawner {
inner: Arc<Inner>,
}
Fields§
§inner: Arc<Inner>
Implementations§
source§impl Spawner
impl Spawner
pub(crate) fn spawn_blocking<F, R>(&self, rt: &Handle, func: F) -> JoinHandle<R> ⓘwhere F: FnOnce() -> R + Send + 'static, R: Send + 'static,
pub(crate) fn spawn_mandatory_blocking<F, R>( &self, rt: &Handle, func: F ) -> Option<JoinHandle<R>>where F: FnOnce() -> R + Send + 'static, R: Send + 'static,
pub(crate) fn spawn_blocking_inner<F, R>( &self, func: F, is_mandatory: Mandatory, name: Option<&str>, rt: &Handle ) -> (JoinHandle<R>, Result<(), SpawnError>)where F: FnOnce() -> R + Send + 'static, R: Send + 'static,
fn spawn_task(&self, task: Task, rt: &Handle) -> Result<(), SpawnError>
fn spawn_thread( &self, shutdown_tx: Sender, rt: &Handle, id: usize ) -> Result<JoinHandle<()>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Spawner
impl Send for Spawner
impl Sync for Spawner
impl Unpin for Spawner
impl !UnwindSafe for Spawner
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more