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 + 'scope

Spawns 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 scope self as argument. This can be used to inject new jobs into self.

See also

This method is akin to Scope::spawn(), but with a FIFO priority. The scope_fifo function has more details about this distinction.

fn spawn_broadcast<BODY>(self: &Self, body: BODY)
where
    BODY: Fn(&ScopeFifo<'scope>, BroadcastContext<'_>) + Send + Sync + 'scope

Spawns 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 scope self as argument, as well as a BroadcastContext.

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) -> T

Returns the argument unchanged.

impl<T> Pointable for ScopeFifo<'scope>

unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T, U> Into for ScopeFifo<'scope>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses 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>