Index: Cargo.toml ================================================================== --- Cargo.toml +++ Cargo.toml @@ -1,8 +1,8 @@ [package] name = "sigq" -version = "0.13.0" +version = "0.13.1" authors = ["Jan Danielsson "] edition = "2021" license = "0BSD" categories = [ "asynchronous", "concurrency", "data-structures" ] keywords = [ "threads", "sync" ] Index: src/pull.rs ================================================================== --- src/pull.rs +++ src/pull.rs @@ -96,10 +96,17 @@ impl Drop for Puller { fn drop(&mut self) { let mut inner = self.0.inner.lock(); inner.npullers -= 1; + + // If this is the last puller then remove all thr nodes. + // The nodes may contain some kind of context that must be notified that + // the node will never reach its destination. + if inner.npullers == 0 { + inner.q.clear(); + } } } #[doc(hidden)] Index: www/changelog.md ================================================================== --- www/changelog.md +++ www/changelog.md @@ -7,11 +7,22 @@ ### Changed ### Removed -## [0.13.0] +## [0.13.1] - 2023-07-25 + +### Added + +### Changed + +- When the last `Puller` is dropped, clear the queue. + +### Removed + + +## [0.13.0] - 2023-07-25 ### Added ### Changed