driveshaft 0.1.1

A minimal, high-performance thread pool for running synchronous tasks with per-thread context from async code.
Documentation
1
2
3
4
5
6
7
use crossbeam::channel::{Receiver, Sender};

use crate::error::DriveShaftError;

pub type Job<T> = Box<dyn FnOnce(&mut T) -> Result<(), DriveShaftError> + Send + 'static>;
pub type JobReciever<T> = Receiver<Job<T>>;
pub type JobSender<T> = Sender<Job<T>>;