Enum forkjoin::TaskResult
[−]
[src]
pub enum TaskResult<Arg, Ret> {
Done(Ret),
Fork(Fork<Arg, Ret>),
}Return values from tasks. Represent a computed value or a fork of the algorithm.
Variants
Done(Ret)Return this from TaskFun to indicate a computed value. Represents a leaf in the
problem tree of the computation.
If the algorithm style is AlgoStyle::Search the value in Done will be sent
directly to the Receiver<Ret> held by the submitter of the computation.
If the algorithm style is AlgoStyle::Summa the value in Done will be inserted
into the JoinBarrier allocated by ForkJoin. If it's the last task to complete
the join function will be executed.
Fork(Fork<Arg, Ret>)Return this from TaskFun to indicate that the algorithm wants to fork.
Takes a Fork instance describing how to fork.