[−][src]Struct flize::FullShield
A FullShield
is largely equivalent to ThinShield
in terms of functionality.
They're both shields with the same guarantees and can be user interchangeably.
The major difference is that FullShield
implements Send
and Sync
while
Shield
does not. FullShield
is provided for scenarios like asynchronous iteration
over a datastructure which is a big pain if the iterator isn't Send
.
The downside to this functionality is that they are much more expensive to create and destroy and even more so when multiple threads are creating and destroying them at the same time. This is due to the fact that full shields require more bookkeeping to handle the fact that they may suddently change locals/threads.
While the latency of creation and destruction of a FullShield
is for the most part
relatively constant it does involve accessing state protected by a Mutex
.
This means that in the unfortunate event that a thread gets preempted in this critical section
creation and destruction may block. This is in constrast to the wait-free creation and destruction
of a ThinShield
.
For documentation on functionality please check the documentation of the Shield
trait.
Trait Implementations
impl<'a> Clone for FullShield<'a>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Drop for FullShield<'a>
[src]
impl<'a> Send for FullShield<'a>
[src]
impl<'a> Shield<'a> for FullShield<'a>
[src]
fn repin(&mut self)
[src]
fn repin_after<F, R>(&mut self, f: F) -> R where
F: FnOnce() -> R,
[src]
F: FnOnce() -> R,
fn retire<F>(&self, f: F) where
F: FnOnce() + 'a,
[src]
F: FnOnce() + 'a,
impl<'a> Sync for FullShield<'a>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for FullShield<'a>
impl<'a> Unpin for FullShield<'a>
impl<'a> !UnwindSafe for FullShield<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,