use std::cmp::Reverse;

use crate::{
    Jiffies, runners::scalable::lazy_heap::LazyRemoveBinHeap,
    services::process_access::IngestableEventBatch,
};

pub(crate) type TaskId = (Jiffies, usize);

// Sorting by arrival time, then by id
pub(super) type TaskIndex = LazyRemoveBinHeap<Reverse<TaskId>>;

#[derive(Debug)]
pub(crate) struct TaskResult {
    pub(crate) id: TaskId,
    pub(crate) pid: usize,
    pub(crate) invocation_time: Jiffies,
    pub(crate) events: IngestableEventBatch,
}
