Compare commits
4 Commits
renovate/c
...
v0.0.4
Author | SHA1 | Date | |
---|---|---|---|
8121bf7985 | |||
49b931775c | |||
5ab54585c0
|
|||
119fb101cf |
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.0.4] - 2025-08-08
|
||||
|
||||
### Other
|
||||
- Configure Renovate (#3)
|
||||
Add renovate.json
|
||||
|
||||
## [0.0.1] - 2025-07-01
|
||||
|
||||
### Added
|
||||
|
@@ -3,7 +3,7 @@ members = ["crates/*"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.0.1"
|
||||
version = "0.0.4"
|
||||
license = "MIT"
|
||||
|
||||
[workspace.dependencies]
|
||||
|
@@ -110,6 +110,6 @@ See [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE) for details.
|
||||
|
||||
## Contribute
|
||||
|
||||
Simply create an issue here or pr https://github.com/kjuulh/noworkers.git, development happens publicly at: https://git.front.kjuulh.io/kjuulh/noworkers.
|
||||
Simply create an issue here or pr https://github.com/kjuulh/noworkers.git, development happens publicly at: https://git.kjuulh.io/kjuulh/noworkers.
|
||||
|
||||
|
||||
|
@@ -4,7 +4,7 @@ edition = "2024"
|
||||
readme = "../../README.md"
|
||||
version.workspace = true
|
||||
license.workspace = true
|
||||
repository = "https://git.front.kjuulh.io/kjuulh/noworkers"
|
||||
repository = "https://git.kjuulh.io/kjuulh/noworkers"
|
||||
authors = ["kjuulh <contact@kasperhermansen.com>"]
|
||||
description = "A small asyncronous worker pool manages thread pool limiting, cancellation and error propogation, inspired by golangs errgroup (requires tokio)"
|
||||
|
||||
|
@@ -3,6 +3,24 @@ use std::{future::Future, sync::Arc};
|
||||
use tokio::{sync::Mutex, task::JoinHandle};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
pub mod extensions {
|
||||
use crate::Workers;
|
||||
|
||||
pub trait WithSysLimitCpus {
|
||||
fn with_limit_to_system_cpus(&mut self) -> &mut Self;
|
||||
}
|
||||
|
||||
impl WithSysLimitCpus for Workers {
|
||||
fn with_limit_to_system_cpus(&mut self) -> &mut Self {
|
||||
self.with_limit(
|
||||
std::thread::available_parallelism()
|
||||
.expect("to be able to get system cpu info")
|
||||
.into(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type ErrChan = Arc<
|
||||
Mutex<(
|
||||
Option<tokio::sync::oneshot::Sender<anyhow::Error>>,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# yaml-language-server: $schema=https://git.front.kjuulh.io/kjuulh/cuddle/raw/branch/main/schemas/base.json
|
||||
# yaml-language-server: $schema=https://git.kjuulh.io/kjuulh/cuddle/raw/branch/main/schemas/base.json
|
||||
|
||||
base: "git@git.front.kjuulh.io:kjuulh/cuddle-rust-lib-plan.git"
|
||||
base: "git@git.kjuulh.io:kjuulh/cuddle-rust-lib-plan.git"
|
||||
|
||||
vars:
|
||||
service: "noworkers"
|
||||
@@ -12,6 +12,6 @@ please:
|
||||
repository: "noworkers"
|
||||
branch: main
|
||||
settings:
|
||||
api_url: "https://git.front.kjuulh.io"
|
||||
api_url: "https://git.kjuulh.io"
|
||||
actions:
|
||||
rust:
|
||||
|
Reference in New Issue
Block a user