drop kubi-pool

This commit is contained in:
griffi-gh 2024-05-02 11:14:47 +02:00
parent dac6e56516
commit 6ee3130f8a
5 changed files with 3 additions and 51 deletions

4
Cargo.lock generated
View file

@ -1190,10 +1190,6 @@ dependencies = [
"log",
]
[[package]]
name = "kubi-pool"
version = "0.0.0"
[[package]]
name = "kubi-server"
version = "0.0.0"

View file

@ -4,7 +4,6 @@ members = [
"kubi-server",
"kubi-shared",
"kubi-logging",
"kubi-pool"
]
default-members = ["kubi"]
resolver = "2"

View file

@ -118,15 +118,12 @@ name = "Kubi Server" # server name
<h2>"In-house" libraries</h2>
- [`hui`](https://github.com/griffi-gh/hui): semi-imm.mode backend-agnostic ui system\
mostly ready to use, it has already replaced the Kubi legacy ui
- [`kubi-ui-glium`](kubi-ui-glium) Glium-based backend for `kubi-ui`
- [`kubi-pool`](kubi-pool): very early work-in-progress work-stealing threadpool system\
aiming to replace `rayon` threadpool that's currently used inside the kubi client (for more control over task priority)
- [`hui`, `hui-glium`, `hui-winit`](https://github.com/griffi-gh/hui): semi-imm.mode backend-agnostic ui system\
- [`kubi-logging`](kubi-logging) fancy-ass custom formatter for `env-logger`
deprecated:
~~`kubi-udp`~~ was a huge pita to work with and eventually got replaced by `uflow` (https://github.com/lowquark/uflow) in #5
- ~~`kubi-udp`~~ eventually got replaced by `uflow` (https://github.com/lowquark/uflow) in #5
- ~~`kubi-pool`~~ decided there's no need to replace rayon for now
<h6 align="right"><i>~ uwu</i></h6>

View file

@ -1,7 +0,0 @@
[package]
name = "kubi-pool"
version = "0.0.0"
edition = "2021"
publish = false
[dependencies]

View file

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