jobsys

Crates.iojobsys
lib.rsjobsys
version0.2.0
sourcesrc
created_at2021-03-16 20:06:10.129761
updated_at2021-03-25 07:55:06.776843
descriptionLockless Work Stealing Job System
homepagehttps://gitlab.com/AngryPixel/jobsys
repositoryhttps://gitlab.com/AngryPixel/jobsys
max_upload_size
id369825
size61,997
LeanderBB (LeanderBB)

documentation

README

JobSys

About

Provides an implementation of a Lockless Work Stealing Job System which, after initialization, does not consume additional memory to schedule jobs.

This crate requires rust edition 2018 and can be run with stable. It has been tested with rust version 1.50.0.

For more details, please consult the crate's documentation

Note: It's recommended to use version 0.2.0 going forward as it fixes many issues in the original release.

Example

use jobsys::{JobSystem, JobScope, JobInstance};

fn main() {
    let thread_count = 4_usize;
    let job_capacity = 512_usize;
    let job_sys = JobSystem::new(thread_count, job_capacity).unwrap();
    let job_scope = JobScope::new_from_system(&job_sys);
    let job_instance = JobInstance::create(&job_scope, || {
        println!("Hello from Job Instance");
        }).unwrap();
    job_instance.wait_with(|| println!("Waiting on Job to Finish")).expect("Failed to wait on job");
}
Commit count: 40

cargo fmt