diff --git a/CHANGELOG.md b/CHANGELOG.md index cd32bf6e..14862c84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ All notable changes to this project will be documented in this file. ## Unreleased +## v0.8.0 + ### Breaking changes * Return shared messages from `broadcast::mpmc` receivers: `recv` and `try_recv` now yield `Arc`, and `bounded` and `unbounded` no longer require `T: Clone`. Shared receives also share the payload's interior mutable state. To preserve the previous owning-receive behavior, use the new `recv_cloned` and `try_recv_cloned`, which follow `T`'s `Clone` semantics and still move the payload out instead of cloning it when nothing else still refers to the message. Callers that sent `Arc` only to avoid cloning can send `T` directly. A retained `Arc` keeps its payload alive after the message leaves the backlog, so a bounded channel's capacity limits retained messages rather than memory. @@ -43,6 +45,7 @@ All notable changes to this project will be documented in this file. ### Improvements * Reduce intermediate payload copies in bounded MPSC receives, especially for large inline messages. +* Transfer reclaimed broadcast head messages directly to receivers, avoiding an extra payload `Arc` clone and unnecessary blocked-sender bookkeeping. * Reduce the cost of initializing an uncontended `OnceCell` by avoiding its internal wait-queue lock. * Reduce the cost of polling a pending oneshot receive again from the same task, which now keeps its registered waker instead of cloning and dropping it. * Reduce the state kept by futures waiting for a `Mutex`, `RwLock`, `Semaphore`, `Once`, `OnceCell`, or bounded broadcast capacity, making lock, permit acquisition, and bounded broadcast send futures smaller. diff --git a/Cargo.lock b/Cargo.lock index 39f8b9f5..0da2c1d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,7 +78,7 @@ dependencies = [ [[package]] name = "asyncband" -version = "0.7.4" +version = "0.8.0" dependencies = [ "hashbrown", "tokio", diff --git a/asyncband/Cargo.toml b/asyncband/Cargo.toml index 76e2ed2b..439ef05f 100644 --- a/asyncband/Cargo.toml +++ b/asyncband/Cargo.toml @@ -17,7 +17,7 @@ [package] name = "asyncband" -version = "0.7.4" +version = "0.8.0" categories = ["asynchronous", "concurrency"] description = "Composable, runtime-agnostic concurrency building blocks for async Rust."