moor icon indicating copy to clipboard operation
moor copied to clipboard

Defer task delay to the scheduler, and let it handle the delay?

Open github-actions[bot] opened this issue 4 months ago • 0 comments

Instead of performing it in the task startup.

https://github.com/rdaum/moor/blob/47435a1442a1f5532c23944029e90982baa99bff/crates/kernel/src/tasks/task.rs#L152


        task_control_receiver: Receiver<TaskControlMsg>,
        control_sender: Sender<(TaskId, SchedulerControlMsg)>,
    ) {
        // TODO: Defer task delay to the scheduler, and let it handle the delay?
        //   Instead of performing it in the task startup.
        if let Some(delay) = delay_start {
            std::thread::sleep(delay);

github-actions[bot] avatar Feb 10 '24 01:02 github-actions[bot]