From 7f95dac3c6c178a23a63e9ce9c84fd4de9c16795 Mon Sep 17 00:00:00 2001 From: mingcheng Date: Fri, 14 Aug 2026 23:30:10 +0800 Subject: [PATCH] refactor: replace mea with asyncband for semaphore - switch dependency in fastpool/Cargo.toml to asyncband - update imports in bounded.rs to use asyncband::semaphore Signed-off-by: mingcheng --- Cargo.lock | 27 +++++++++++++++++---------- fastpool/Cargo.toml | 2 +- fastpool/src/bounded.rs | 4 ++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c28e9ee..459c143 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,6 +52,16 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "asyncband" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94a214ba60d6231afd0e805e3c27c45a1626d9debaa5a5061c45a1ea1b2f1ed0" +dependencies = [ + "hashbrown", + "slab", +] + [[package]] name = "bitflags" version = "2.10.0" @@ -136,11 +146,17 @@ dependencies = [ name = "fastpool" version = "1.1.0" dependencies = [ - "mea", + "asyncband", "scopeguard", "tokio", ] +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + [[package]] name = "heck" version = "0.5.0" @@ -174,15 +190,6 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "mea" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6747f54621d156e1b47eb6b25f39a941b9fc347f98f67d25d8881ff99e8ed832" -dependencies = [ - "slab", -] - [[package]] name = "mio" version = "1.1.1" diff --git a/fastpool/Cargo.toml b/fastpool/Cargo.toml index f7ee197..8d8aead 100644 --- a/fastpool/Cargo.toml +++ b/fastpool/Cargo.toml @@ -26,7 +26,7 @@ repository.workspace = true rust-version.workspace = true [dependencies] -mea = { version = "0.6.0" } +asyncband = { version = "0.6.7" } scopeguard = { version = "1.2.0" } [dev-dependencies] diff --git a/fastpool/src/bounded.rs b/fastpool/src/bounded.rs index ca1b7bf..962081e 100644 --- a/fastpool/src/bounded.rs +++ b/fastpool/src/bounded.rs @@ -80,8 +80,8 @@ use std::sync::Weak; use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering; -use mea::semaphore::OwnedSemaphorePermit; -use mea::semaphore::Semaphore; +use asyncband::semaphore::OwnedSemaphorePermit; +use asyncband::semaphore::Semaphore; use crate::ManageObject; use crate::ObjectStatus;