diff --git a/CHANGELOG.md b/CHANGELOG.md index aa77d7e8..a8d9cf54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,11 @@ ### Fixed -- Fix `get_or_insert_with` and `get_or_try_insert_with` methods in `future::Cache` - can lead undefined behavior as accepting `init` future that is not `Send` or - `'static`. ([#31][gh-issue-0031]) +- Fix a bug in `get_or_insert_with` and `get_or_try_insert_with` methods of + `future::Cache` by adding missing bounds `Send` and `'static` to the `init` + future. Without this fix, these methods will accept non-`Send` or + non-`'static` future and may cause undefined behavior. + ([#31][gh-issue-0031]) - Fix `usize` overflow on big cache capacity. ([#28][gh-pull-0028]) ### Added @@ -14,6 +16,12 @@ - Add examples for `get_or_insert_with` and `get_or_try_insert_with` methods to the docs. ([#30][gh-pull-0030]) +### Changed + +- Downgrade crossbeam-epoch used in moka-cht from v0.9.x to v0.8.x as a possible + workaround for segmentation faults on many-core CPU machines. + ([#33][gh-pull-0033]) + ## Version 0.5.1 @@ -96,7 +104,8 @@ [caffeine-git]: https://github.com/ben-manes/caffeine -[gh-issue-0030]: https://github.com/moka-rs/moka/issues/30/ +[gh-pull-0033]: https://github.com/moka-rs/moka/pull/33/ +[gh-issue-0031]: https://github.com/moka-rs/moka/issues/31/ [gh-pull-0030]: https://github.com/moka-rs/moka/pull/30/ [gh-pull-0028]: https://github.com/moka-rs/moka/pull/28/ [gh-pull-0022]: https://github.com/moka-rs/moka/pull/22/ diff --git a/Cargo.toml b/Cargo.toml index 29111035..3c8d9d2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ future = ["async-io", "async-lock"] [dependencies] crossbeam-channel = "0.5" -moka-cht = "0.5" +moka-cht = "0.4.2" num_cpus = "1.13" once_cell = "1.7" parking_lot = "0.11" diff --git a/README.md b/README.md index a0b29233..0e646fd7 100644 --- a/README.md +++ b/README.md @@ -342,7 +342,7 @@ To run all tests including `future` feature and doc tests on the README, use the following command: ```console -$ RUSTFLAGS='--cfg skeptic -cfg trybuild' cargo test --all-features +$ RUSTFLAGS='--cfg skeptic --cfg trybuild' cargo test --all-features ```