Skip to content

Commit

Permalink
Releasing 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vorner committed Jul 30, 2022
1 parent 6d3ef6d commit f4bbac3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 10 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- stable
- beta
- nightly
- 1.45.0 # The weak-into-raw feature stabilized
# 1.45.0 # The weak-into-raw feature stabilized
# 1.31.0 is tested separately, because it is supposed to only build

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -170,6 +170,26 @@ jobs:
- name: Run clippy linter
run: cargo test --all --release --benches --all-features

semi-ancient:
name: Check it compiles on old Rust (1.45.0)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.45.0
profile: minimal
default: true

- name: Restore cache
uses: Swatinem/rust-cache@v1

- name: Run check
run: rm Cargo.lock && cargo check --all-features

ancient:
name: Check it compiles on old Rust (1.31.0)
runs-on: ubuntu-latest
Expand All @@ -187,7 +207,7 @@ jobs:
- name: Restore cache
uses: Swatinem/rust-cache@v1

- name: Run clippy linter
- name: Run check
run: rm Cargo.lock && cargo check

miri:
Expand All @@ -211,7 +231,8 @@ jobs:
- name: Run miri
env:
PROPTEST_CASES: "10"
MIRIFLAGS: "-Zmiri-disable-isolation"
# TODO: Do something with the stacked borrows. Figure out what it means.
MIRIFLAGS: "-Zmiri-disable-isolation -Zmiri-disable-stacked-borrows"
run: cargo miri test --all-features

thread_sanitizer-MacOS:
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased
# 1.5.1

* bug: Insufficient synchronization on weak platforms (#76).

Never observed in practice (it's suspected practical weak platforms like ARM
are still stronger than the model), but still technically UB.
* docs: Mention triomphe's `ThinArc` around the fat-pointer limitations.

# 1.5.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "arc-swap"
version = "1.5.0"
version = "1.5.1"
authors = ["Michal 'vorner' Vaner <vorner@vorner.cz>"]
description = "Atomically swappable Arc"
documentation = "https://docs.rs/arc-swap"
Expand Down
4 changes: 2 additions & 2 deletions src/as_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ impl<'a, T: RefCnt> AsRaw<T::Base> for &'a Guard<T> {
}
}

impl<'a, T: RefCnt> Sealed for Guard<T> {}
impl<'a, T: RefCnt> AsRaw<T::Base> for Guard<T> {
impl<T: RefCnt> Sealed for Guard<T> {}
impl<T: RefCnt> AsRaw<T::Base> for Guard<T> {
fn as_raw(&self) -> *mut T::Base {
T::as_ptr(self)
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ pub struct Guard<T: RefCnt, S: Strategy<T> = DefaultStrategy> {
inner: S::Protected,
}

impl<'a, T: RefCnt, S: Strategy<T>> Guard<T, S> {
impl<T: RefCnt, S: Strategy<T>> Guard<T, S> {
/// Converts it into the held value.
///
/// This, on occasion, may be a tiny bit faster than cloning the Arc or whatever is being held
Expand Down Expand Up @@ -199,7 +199,7 @@ impl<'a, T: RefCnt, S: Strategy<T>> Guard<T, S> {
}
}

impl<'a, T: RefCnt, S: Strategy<T>> Deref for Guard<T, S> {
impl<T: RefCnt, S: Strategy<T>> Deref for Guard<T, S> {
type Target = T;
#[inline]
fn deref(&self) -> &T {
Expand Down

2 comments on commit f4bbac3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Track benchmarks

Benchmark suite Current: f4bbac3 Previous: f7f192d Ratio
uncontended/load 20 ns/iter (± 0) 20 ns/iter (± 0) 1
uncontended/load_full 29 ns/iter (± 0) 29 ns/iter (± 1) 1
uncontended/load_many 47 ns/iter (± 0) 38 ns/iter (± 0) 1.24
uncontended/store 142 ns/iter (± 1) 109 ns/iter (± 0) 1.30
uncontended/cache 1 ns/iter (± 0) 0 ns/iter (± 0) Infinity
concurrent_loads/load 28 ns/iter (± 9) 29 ns/iter (± 9) 0.97
concurrent_loads/load_full 43 ns/iter (± 16) 50 ns/iter (± 20) 0.86
concurrent_loads/load_many 87 ns/iter (± 24) 67 ns/iter (± 20) 1.30
concurrent_loads/store 922 ns/iter (± 386) 990 ns/iter (± 382) 0.93
concurrent_loads/cache 1 ns/iter (± 0) 0 ns/iter (± 0) Infinity
concurrent_store/load 120 ns/iter (± 2) 97 ns/iter (± 3) 1.24
concurrent_store/load_full 170 ns/iter (± 12) 148 ns/iter (± 22) 1.15
concurrent_store/load_many 210 ns/iter (± 6) 191 ns/iter (± 4) 1.10
concurrent_store/store 1208 ns/iter (± 20) 1106 ns/iter (± 75) 1.09
concurrent_store/cache 2 ns/iter (± 0) 1 ns/iter (± 0) 2

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Track benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: f4bbac3 Previous: f7f192d Ratio
uncontended/cache 1 ns/iter (± 0) 0 ns/iter (± 0) Infinity
concurrent_loads/cache 1 ns/iter (± 0) 0 ns/iter (± 0) Infinity
concurrent_store/cache 2 ns/iter (± 0) 1 ns/iter (± 0) 2

This comment was automatically generated by workflow using github-action-benchmark.

CC: @vorner

Please sign in to comment.