pub struct Task {
pub id: TaskId,
pub priority: TaskPriority,
pub dependencies: Vec<TaskId>,
pub numa_node: Option<NumaNode>,
pub estimated_time_us: Option<u64>,
}Expand description
A parallel task.
Fields§
§id: TaskIdTask identifier
priority: TaskPriorityTask priority
dependencies: Vec<TaskId>Task dependencies (must complete before this task)
numa_node: Option<NumaNode>NUMA node affinity
estimated_time_us: Option<u64>Estimated execution time (microseconds)
Implementations§
Source§impl Task
impl Task
Sourcepub fn with_priority(self, priority: TaskPriority) -> Self
pub fn with_priority(self, priority: TaskPriority) -> Self
Set the task priority.
Sourcepub fn with_dependency(self, dep: TaskId) -> Self
pub fn with_dependency(self, dep: TaskId) -> Self
Add a dependency.
Sourcepub fn with_numa_node(self, node: NumaNode) -> Self
pub fn with_numa_node(self, node: NumaNode) -> Self
Set NUMA node affinity.
Sourcepub fn with_estimated_time(self, time_us: u64) -> Self
pub fn with_estimated_time(self, time_us: u64) -> Self
Set estimated execution time.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more