Index: Cargo.toml ================================================================== --- Cargo.toml +++ Cargo.toml @@ -1,8 +1,8 @@ [package] name = "bndpresbufch" -version = "0.1.1" +version = "0.1.2" edition = "2021" license = "0BSD" # https://crates.io/category_slugs categories = [ "concurrency", "data-structures" ] keywords = [ "channel" ] @@ -18,11 +18,11 @@ "rustfmt.toml" ] [dependencies] parking_lot = { version = "0.12.3" } -bndpresbufq = { version = "0.1.3" } +bndpresbufq = { version = "0.1.4" } rustc-hash = { version = "2.0.0" } [dev-dependencies] tokio = { version = "1.40.0", features = [ "macros", "rt-multi-thread" Index: src/lib.rs ================================================================== --- src/lib.rs +++ src/lib.rs @@ -22,10 +22,17 @@ //! // Fail to add more data //! assert_eq!(tx.try_push(vec![5]), Err(Error::WontFit(vec![5]))); //! //! // Force push data to the queue, ejecting the oldest buffer //! tx.force_push(vec![6]).unwrap(); +//! +//! // Pull off a buffer that must be handled. +//! // Then drop the managed node before marking it has handled, which should +//! // put it back onto the channel. +//! let n = rx.pop_managed().unwrap(); +//! assert_eq!(*n, [3, 4]); +//! drop(n); //! //! assert_eq!(rx.pop(), Some(vec![3, 4])); //! assert_eq!(rx.try_pop(), Ok(Some(vec![6]))); //! assert_eq!(rx.try_pop(), Ok(None)); //! ``` Index: www/changelog.md ================================================================== --- www/changelog.md +++ www/changelog.md @@ -1,20 +1,30 @@ # Change Log ## [Unreleased] -[Details](/vdiff?from=bndpresbufch-0.1.1&to=trunk) +[Details](/vdiff?from=bndpresbufch-0.1.2&to=trunk) ### Added ### Changed ### Removed --- -## [0.1.1] - 2024-10-05 +## [0.1.2] - 2024-10-05 + +[Details](/vdiff?from=bndpresbufch-0.1.1&to=bndpresbufch-0.1.2) + +### Changed + +- Update `bndpresbufq` to `0.1.4` to get queue size bugfix. + +--- + +## [0.1.1] (yanked) - 2024-10-05 [Details](/vdiff?from=bndpresbufch-0.1.0&to=bndpresbufch-0.1.1) ### Added