Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deadpool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
- uses: dtolnay/rust-toolchain@v1
with:
components: rustc,rust-std,cargo
toolchain: "1.75"
- run: ../../tools/cargo-update-minimal-versions.sh 1.75
toolchain: "1.80"
- run: ../../tools/cargo-update-minimal-versions.sh 1.80
- run: cargo check --all-features
rustdoc:
name: Doc
Expand Down
5 changes: 5 additions & 0 deletions crates/deadpool/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- next-header -->

## [Unreleased]

- Remove lazy_static dependency
- Bump up MSRV to `1.80`

## [0.12.3] - 2025-08-19

- Add unique `id` to objects which can be read via the `Object::id` method
Expand Down
7 changes: 3 additions & 4 deletions crates/deadpool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "deadpool"
version = "0.12.3"
version = "0.12.4"
edition = "2021"
rust-version = "1.75"
rust-version = "1.80"
authors = ["Michael P. Jung <[email protected]>"]
description = "Dead simple async pool"
keywords = ["async", "database", "pool"]
Expand All @@ -22,7 +22,6 @@ rt_tokio_1 = ["deadpool-runtime/tokio_1"]
rt_async-std_1 = ["deadpool-runtime/async-std_1"]

[dependencies]
lazy_static = "1.5.0"
num_cpus = "1.11.1"
# `serde` feature
serde = { version = "1.0.103", features = ["derive"], optional = true }
Expand All @@ -36,7 +35,7 @@ tokio = { version = "1.5", features = ["sync"] }
[dev-dependencies]
async-std = { version = "1.0", features = ["attributes"] }
config = { version = "0.15", features = ["json"] }
criterion = { version = "0.5", features = ["html_reports", "async_tokio"] }
criterion = { version = "0.7", features = ["html_reports", "async_tokio"] }
itertools = "0.14"
tokio = { version = "1.5.0", features = [
"macros",
Expand Down
12 changes: 6 additions & 6 deletions crates/deadpool/src/util.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
lazy_static::lazy_static! {
/// Cache the physical CPU count to avoid calling `num_cpus::get()`
/// multiple times, which is expensive when creating pools in quick
/// succession.
static ref CPU_COUNT: usize = num_cpus::get();
}
use std::sync::LazyLock;

/// Cache the physical CPU cofunt to avoid calling `num_cpus::get()`
/// multiple times, which is expensive when creating pools in quick
/// succession.
static CPU_COUNT: LazyLock<usize> = LazyLock::new(num_cpus::get);

/// Get the default maximum size of a pool, which is `cpu_core_count * 2`
/// including logical cores (Hyper-Threading).
Expand Down