[][src]Crate scrummage

A thin abstraction over OS process scheduling APIs.

By signalling the priority of our processes to the operating system, we gain more control over our program's resource usage, and which tasks get completed first.

For example, we can configure our UI to preempt background tasks by giving it a higher priority:

let me = Process::current().priority().unwrap();
let boring_work = me.lower().next().expect("no lower priority available");
// It's fine if the `busy_child_process` has already finished
let _ = Process::from(&mut busy_child_process)
    .set_priority(boring_work);

This will tell the OS to make sure me is always given all the resources it needs, making it snappier.

Structs

NotFound

The process couldn't be found.

Priority

A prioritisation level

Process

A process running on this machine.

Enums

Unchanged

The reason the priority of a process couldn't be set.