pub struct Task {
pub actor_id: ActorId,
pub message: Message,
pub priority: Priority,
pub additional_messages: Vec<Message>,
}Expand description
A task to be executed by a worker.
When additional_messages is non-empty the task represents a batch: the
worker processes message first, then each entry in additional_messages.
This avoids pushing N separate Tasks onto the work-stealing queue.
Fields§
§actor_id: ActorIdTarget actor ID
message: MessageMessage to process
priority: PriorityPriority level
additional_messages: Vec<Message>Extra messages that belong to the same batch (processed after message).
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 UnsafeUnpin 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