diff --git a/Cargo.lock b/Cargo.lock index a94aca2..ab6909a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -144,7 +144,7 @@ dependencies = [ [[package]] name = "fastpool" -version = "1.1.1" +version = "1.1.2" dependencies = [ "asyncband", "scopeguard", diff --git a/README.md b/README.md index 928f290..48e7161 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Fastpool +> [!WARNING] +> +> Fastpool is deprecated and is being archived. Development has moved to [`asyncband::pool`](https://docs.rs/asyncband/0.7.1/asyncband/pool/), which is the maintained successor. Fastpool 1.1.2 is the final planned release. + [![Crates.io][crates-badge]][crates-url] [![Documentation][docs-badge]][docs-url] [![MSRV 1.85][msrv-badge]](https://www.whatrustisit.com) @@ -22,14 +26,18 @@ Fastpool provides fast and runtime-agnostic object pools for Async Rust. You can read [the docs page](https://docs.rs/fastpool/*/fastpool/) for a complete overview of the library. -## Installation +## Migration -Add the dependency to your `Cargo.toml` via: +Replace the Fastpool dependency with AsyncBand's `pool` feature: ```shell -cargo add fastpool +cargo add asyncband --features pool ``` +Fastpool's root items are available under `asyncband::pool`, while `bounded` and `unbounded` remain submodules. For example, replace `fastpool::{ManageObject, bounded}` with `asyncband::pool::{ManageObject, bounded}`. + +AsyncBand 0.7.1 also strengthens several pool contracts. In particular, `bounded::Pool::replenish` is now `replenish_to` and returns a `Result`, and `bounded::PoolStatus::wait_count` has been removed. Review the [AsyncBand pool documentation](https://docs.rs/asyncband/0.7.1/asyncband/pool/) when migrating those APIs. + ## Documentation Read the online documents at https://docs.rs/fastpool. diff --git a/fastpool/Cargo.toml b/fastpool/Cargo.toml index 555a9f4..87e7fb4 100644 --- a/fastpool/Cargo.toml +++ b/fastpool/Cargo.toml @@ -15,8 +15,8 @@ [package] name = "fastpool" -description = "This crates implements a fast object pool for Async Rust." -version = "1.1.1" +description = "DEPRECATED: Use asyncband::pool for runtime-agnostic async object pools." +version = "1.1.2" edition.workspace = true homepage.workspace = true diff --git a/fastpool/src/lib.rs b/fastpool/src/lib.rs index 57e3938..a69eeb7 100644 --- a/fastpool/src/lib.rs +++ b/fastpool/src/lib.rs @@ -12,10 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![deprecated( + since = "1.1.2", + note = "Fastpool is no longer maintained; use asyncband::pool instead" +)] #![deny(missing_docs)] //! Fastpool provides fast and runtime-agnostic object pools for Async Rust. //! +//! # Deprecation +//! +//! Fastpool is no longer maintained. Use [`asyncband::pool`](https://docs.rs/asyncband/0.7.1/asyncband/pool/), the maintained successor. See the repository README for migration notes. +//! //! This crate provides two implementations: [bounded pool](bounded::Pool) and //! [unbounded pool](unbounded::Pool). //! diff --git a/fastpool/tests/recycle_cancelled_tests.rs b/fastpool/tests/recycle_cancelled_tests.rs index cc02ad3..5f77095 100644 --- a/fastpool/tests/recycle_cancelled_tests.rs +++ b/fastpool/tests/recycle_cancelled_tests.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(deprecated)] + use std::convert::Infallible; use std::sync::Arc; use std::sync::atomic::AtomicUsize; diff --git a/fastpool/tests/replenish_tests.rs b/fastpool/tests/replenish_tests.rs index 0b2ddc6..70db53b 100644 --- a/fastpool/tests/replenish_tests.rs +++ b/fastpool/tests/replenish_tests.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(deprecated)] + use std::convert::Infallible; use std::sync::Arc;