pub enum TaskResult<Arg, Ret> {
Done(Ret),
Fork(Vec<Arg>, Option<Ret>),
}
Return values from tasks. Represent a computed value or a fork of the algorithm.
Variants
Done | 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 Job held by the submitter of the computation.
If the algorithm style is AlgoStyle::Reduce the value in Done will be inserted
into a join barrier and later passed to the algorithms join function when all
subtasks have completed execution.
|
Fork | Return this from TaskFun to indicate that the algorithm wants to fork.
Takes a list of arguments to fork on. One subtask will be created for each argument.
The second value is only used by ReduceStyle::Arg -algorithms to send a value directly
to the TaskJoinArg , passing None in such algorithms will yield a panic.
|
Keyboard shortcuts
- ?
- Show this help dialog
- S
- Focus the search field
- ⇤
- Move up in search results
- ⇥
- Move down in search results
- ⏎
- Go to active search result
Search tricks
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
, enum
,
trait
, typedef
(or
tdef
).
Search functions by type signature (e.g.
vec -> usize
)