Skip to content

Commit

Permalink
chore(*): prepare for SCC 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wvwwvwwv committed Sep 30, 2024
1 parent c27c351 commit 1c22902
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Version 2

2.2.0

* (IN-PROGRESS) Add `Comparable` and `Equivalent` traits: [#162](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/162) by [qthree](https://github.com/qthree).

2.1.18

* Add `TreeIndex::peek_entry`: [#157](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/157) by [qthree](https://github.com/qthree).
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "scc"
description = "High performance containers and utilities for concurrent and asynchronous programming"
documentation = "https://docs.rs/scc"
version = "2.1.18"
version = "2.2.0"
authors = ["wvwwvwwv <[email protected]>"]
edition = "2021"
rust-version = "1.65.0"
Expand Down
2 changes: 2 additions & 0 deletions src/hash_table/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,9 @@ mod test {
use std::pin::Pin;
use tokio::sync::Barrier;

#[cfg(not(miri))]
static_assertions::assert_eq_size!(Bucket<String, String, (), OPTIMISTIC>, [u8; BUCKET_LEN * 2]);
#[cfg(not(miri))]
static_assertions::assert_eq_size!(Bucket<String, String, DoublyLinkedList, CACHE>, [u8; BUCKET_LEN * 4]);

fn default_bucket<K: Eq, V, L: LruList, const TYPE: char>() -> Bucket<K, V, L, TYPE> {
Expand Down
34 changes: 34 additions & 0 deletions src/tests/correctness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ mod hashmap_test {
use std::sync::Arc;
use tokio::sync::Barrier as AsyncBarrier;

#[cfg(not(miri))]
static_assertions::assert_impl_all!(HashMap<String, String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_impl_all!(Reserve<String, String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(HashMap<String, *const String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(Reserve<String, *const String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_impl_all!(hash_map::OccupiedEntry<String, String>: Send, Sync);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(hash_map::OccupiedEntry<String, *const String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_impl_all!(hash_map::VacantEntry<String, String>: Send, Sync);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(hash_map::VacantEntry<String, *const String>: Send, Sync, UnwindSafe);

struct R(&'static AtomicUsize);
Expand Down Expand Up @@ -816,9 +824,13 @@ mod hashindex_test {
use std::thread;
use tokio::sync::Barrier as AsyncBarrier;

#[cfg(not(miri))]
static_assertions::assert_impl_all!(HashIndex<String, String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_impl_all!(Iter<'static, 'static, String, String>: UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(HashIndex<String, *const String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(Iter<'static, 'static, String, *const String>: Send, Sync, UnwindSafe);

struct R(&'static AtomicUsize);
Expand Down Expand Up @@ -1426,7 +1438,9 @@ mod hashset_test {
use crate::HashSet;
use std::panic::UnwindSafe;

#[cfg(not(miri))]
static_assertions::assert_impl_all!(HashSet<String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(HashSet<*const String>: Send, Sync, UnwindSafe);

#[test]
Expand Down Expand Up @@ -1464,11 +1478,17 @@ mod hashcache_test {
use std::sync::Arc;
use tokio::sync::Barrier as AsyncBarrier;

#[cfg(not(miri))]
static_assertions::assert_impl_all!(HashCache<String, String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(HashCache<String, *const String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_impl_all!(hash_cache::OccupiedEntry<String, String>: Send, Sync);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(hash_cache::OccupiedEntry<String, *const String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_impl_all!(hash_cache::VacantEntry<String, String>: Send, Sync);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(hash_cache::VacantEntry<String, *const String>: Send, Sync, UnwindSafe);

struct R(&'static AtomicUsize);
Expand Down Expand Up @@ -1815,11 +1835,17 @@ mod treeindex_test {
use tokio::sync::Barrier as AsyncBarrier;
use tokio::task;

#[cfg(not(miri))]
static_assertions::assert_impl_all!(TreeIndex<String, String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_impl_all!(Iter<'static, 'static, String, String>: UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_impl_all!(Range<'static, 'static, String, String, String, RangeInclusive<String>>: UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(TreeIndex<String, *const String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(Iter<'static, 'static, String, *const String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(Range<'static, 'static, String, *const String, String, RangeInclusive<String>>: Send, Sync, UnwindSafe);

struct R(&'static AtomicUsize);
Expand Down Expand Up @@ -2600,9 +2626,13 @@ mod bag_test {
use tokio::sync::Barrier as AsyncBarrier;
use tokio::task;

#[cfg(not(miri))]
static_assertions::assert_impl_all!(Bag<String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_impl_all!(IterMut<'static, String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(Bag<*const String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(IterMut<'static, *const String>: Send, Sync, UnwindSafe);

struct R(&'static AtomicUsize);
Expand Down Expand Up @@ -2783,7 +2813,9 @@ mod queue_test {
use std::sync::{Arc, Barrier};
use std::thread;

#[cfg(not(miri))]
static_assertions::assert_impl_all!(Queue<String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(Queue<*const String>: Send, Sync, UnwindSafe);

struct R(&'static AtomicUsize, usize, usize);
Expand Down Expand Up @@ -2976,7 +3008,9 @@ mod stack_test {
use std::{panic::UnwindSafe, sync::Arc};
use tokio::sync::Barrier as AsyncBarrier;

#[cfg(not(miri))]
static_assertions::assert_impl_all!(Stack<String>: Send, Sync, UnwindSafe);
#[cfg(not(miri))]
static_assertions::assert_not_impl_all!(Stack<*const String>: Send, Sync, UnwindSafe);

#[derive(Debug)]
Expand Down

0 comments on commit 1c22902

Please sign in to comment.