🍌 Potassium - A lean mean job 'n task machine
Potassium is a job scheduler for modern multi-threaded game engines.
It is designed so that the entire engine can be built around it in order to maximize CPU utilization.
Features
- Job dependencies
- Priority scheduling
- Configurable worker threads
- Fiber support (resumable jobs)
- Jobs with return values
Planned Features
- 🕑 Job graphs (DAGs) - coming soon
Example Usage
use ;
let scheduler = default;
println!;
let long_job = scheduler
.job_builder
.priority
.spawn_with_result;
let job1 = scheduler
.job_builder
.priority
.spawn;
let job2 = scheduler
.job_builder
.priority
.spawn;
let job_sync = scheduler
.job_builder
.priority
.dependencies
.spawn;
// Jobs can be awaited using the returned JobHandle
job_sync.wait;
println!;
let long_job_duration = long_job.wait;
println!;
scheduler.wait_for_all;
println!;