pub struct ThreadStrategy();Available on crate feature
std only.Expand description
Strategy which drops the contained value in a newly spawned background thread.
A new thread is spawned (using std::thread::spawn) for every dropped value.
This is conceptually very simple, but relatively slow since spawning a thread has overhead.
Trait Implementations§
Source§impl<T: Send + 'static> BackdropStrategy<T> for ThreadStrategy
impl<T: Send + 'static> BackdropStrategy<T> for ThreadStrategy
Auto Trait Implementations§
impl Freeze for ThreadStrategy
impl RefUnwindSafe for ThreadStrategy
impl Send for ThreadStrategy
impl Sync for ThreadStrategy
impl Unpin for ThreadStrategy
impl UnwindSafe for ThreadStrategy
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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