Skip to main content

send_to_workers

Function send_to_workers 

Source
async fn send_to_workers(
    workers: &Arc<Mutex<Vec<WorkerSender<Result<Instruction, Status>>>>>,
    worker_id: u32,
    instruction: Instruction,
    inter_worker_interval: u64,
)
Expand description

Send an instruction to workers according to the specified parameters.

ยงArguments

  • workers - registry of worker senders
  • worker_id - target: ALL_WORKERS for broadcast, or a specific worker ID
  • instruction - the instruction to send
  • inter_worker_interval - seconds between workers for broadcast sends