goggles 0.2.0

Building blocks for a hibitset based ECS library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::par_seq::Pool;

/// A system runner that runs parallel systems using `rayon::join`.
#[derive(Default)]
pub struct RayonPool;

impl Pool for RayonPool {
    fn join<A, B, RA, RB>(&self, a: A, b: B) -> (RA, RB)
    where
        A: FnOnce() -> RA + Send,
        B: FnOnce() -> RB + Send,
        RA: Send,
        RB: Send,
    {
        rayon::join(a, b)
    }
}