simple_parallel 0.3.0

Straight-forward functions and types for basic data parallel operations, including parallel maps, for loops and thread pools.
1
2
3
4
5
6
7
8
9
10
11
12
use std::thread::{Thread, JoinGuard};

pub trait Executor {
    type Guard;
    fn submit(&self, job: F) where F: FnOnce() -> Self::Guard;
}

pub struct NativeThreadPerJob;

impl Executor for NativeThreadPerJob {
    type Guard = JoinGuard
}