use std::{thread::JoinHandle, collections::VecDeque}; pub struct KubiPool { callback: fn(T) -> R, threads: Vec>, } struct Task { priority: u8, data: T, } fn task_loop() { let tasks = VecDeque::>::new(); loop { }; } impl KubiPool { pub fn new(threads: usize, callback: fn(T) -> R) -> Self { Self { callback, threads: (0..threads).map(|_| { std::thread::spawn(move || task_loop::()) }).collect(), } } pub fn resize(&mut self, threads: usize) { } }