moor
moor copied to clipboard
Defer task delay to the scheduler, and let it handle the delay?
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);