Struct ScopeFifo
struct ScopeFifo<'scope> { ... }
Represents a fork-join scope which can be used to spawn any number of tasks.
Those spawned from the same thread are prioritized in relative FIFO order.
See scope_fifo() for more information.
Implementations
impl<'scope> ScopeFifo<'scope>
fn spawn_fifo<BODY>(self: &Self, body: BODY) where BODY: FnOnce(&ScopeFifo<'scope>) + Send + 'scopeSpawns a job into the fork-join scope
self. This job will execute sometime before the fork-join scope completes. The job is specified as a closure, and this closure receives its own reference to the scopeselfas argument. This can be used to inject new jobs intoself.See also
This method is akin to
Scope::spawn(), but with a FIFO priority. Thescope_fifofunction has more details about this distinction.fn spawn_broadcast<BODY>(self: &Self, body: BODY) where BODY: Fn(&ScopeFifo<'scope>, BroadcastContext<'_>) + Send + Sync + 'scopeSpawns a job into every thread of the fork-join scope
self. This job will execute on each thread sometime before the fork-join scope completes. The job is specified as a closure, and this closure receives its own reference to the scopeselfas argument, as well as aBroadcastContext.
impl<'scope> Debug for ScopeFifo<'scope>
fn fmt(self: &Self, fmt: &mut Formatter<'_>) -> Result
impl<'scope> Freeze for ScopeFifo<'scope>
impl<'scope> RefUnwindSafe for ScopeFifo<'scope>
impl<'scope> Send for ScopeFifo<'scope>
impl<'scope> Sync for ScopeFifo<'scope>
impl<'scope> Unpin for ScopeFifo<'scope>
impl<'scope> UnsafeUnpin for ScopeFifo<'scope>
impl<'scope> UnwindSafe for ScopeFifo<'scope>
impl<T> Any for ScopeFifo<'scope>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for ScopeFifo<'scope>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for ScopeFifo<'scope>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for ScopeFifo<'scope>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for ScopeFifo<'scope>
unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T, U> Into for ScopeFifo<'scope>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for ScopeFifo<'scope>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for ScopeFifo<'scope>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>