Skip to content

Commit

Permalink
Finish statefull key comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
al8n committed Dec 24, 2024
1 parent 60587d1 commit bdaa1a5
Show file tree
Hide file tree
Showing 164 changed files with 881 additions and 42,444 deletions.
56 changes: 3 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:
push:
branches:
- master
- crossbeam-skiplist-fd
schedule:
- cron: '0 1 * * *'

Expand Down Expand Up @@ -38,11 +38,10 @@ jobs:
strategy:
fail-fast: false
matrix:
# aarch64/x86_64 macOS and aarch64 Linux are tested on Cirrus CI
include:
- rust: '1.63'
- rust: '1.81'
os: ubuntu-latest
- rust: '1.63'
- rust: '1.81'
os: windows-latest
- rust: stable
os: ubuntu-latest
Expand Down Expand Up @@ -117,43 +116,6 @@ jobs:
- name: dependency tree check
run: ci/dependencies.sh

# When this job failed, run ci/no_atomic.sh and commit result changes.
codegen:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
timeout-minutes: 60
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update stable
- run: ci/no_atomic.sh
- run: git add -N . && git diff --exit-code
if: github.repository_owner != 'crossbeam-rs' || github.event_name != 'schedule'
- id: diff
run: |
git config user.name "Taiki Endo"
git config user.email "te316e89@gmail.com"
git add -N .
if ! git diff --exit-code; then
git add .
git commit -m "Update no_atomic.rs"
echo 'success=false' >>"${GITHUB_OUTPUT}"
fi
if: github.repository_owner == 'crossbeam-rs' && github.event_name == 'schedule'
- uses: peter-evans/create-pull-request@v7
with:
title: Update no_atomic.rs
body: |
Auto-generated by [create-pull-request][1]
[Please close and immediately reopen this pull request to run CI.][2]
[1]: https://github.com/peter-evans/create-pull-request
[2]: https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
branch: update-no-atomic-rs
if: github.repository_owner == 'crossbeam-rs' && github.event_name == 'schedule' && steps.diff.outputs.success == 'false'

# Check formatting.
rustfmt:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -182,7 +144,6 @@ jobs:
fail-fast: false
matrix:
group:
- channel
- others
runs-on: ubuntu-latest
timeout-minutes: 120 # TODO
Expand Down Expand Up @@ -218,17 +179,6 @@ jobs:
- name: Run sanitizers
run: ci/san.sh

# Run loom tests.
loom:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update stable
- name: loom
run: ci/crossbeam-epoch-loom.sh

# Check if the document can be generated without warning.
docs:
runs-on: ubuntu-latest
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/release.yml

This file was deleted.

110 changes: 15 additions & 95 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,105 +1,25 @@
# Version 0.8.4
# Version 0.1.4

- Remove dependency on `cfg-if`. (#1072)

# Version 0.8.3

- Bump the minimum supported Rust version to 1.61. (#1037)

# Version 0.8.2

- Bump the minimum supported Rust version to 1.38. (#877)

# Version 0.8.1

- Support targets that do not have atomic CAS on stable Rust (#698)

# Version 0.8.0

- Bump the minimum supported Rust version to 1.36.
- Bump `crossbeam-channel` to `0.5`.
- Bump `crossbeam-deque` to `0.8`.
- Bump `crossbeam-epoch` to `0.9`.
- Bump `crossbeam-queue` to `0.3`.
- Bump `crossbeam-utils` to `0.8`.

# Version 0.7.3

- Fix breakage with nightly feature due to rust-lang/rust#65214.
- Bump `crossbeam-channel` to `0.4`.
- Bump `crossbeam-epoch` to `0.8`.
- Bump `crossbeam-queue` to `0.2`.
- Bump `crossbeam-utils` to `0.7`.

# Version 0.7.2
- Use `dbutils::equivalentor::Comparator` and `dbutils::equivalentor::QueryComparator` for more flexible customizied key comparasions.

- Bump `crossbeam-channel` to `0.3.9`.
- Bump `crossbeam-epoch` to `0.7.2`.
- Bump `crossbeam-utils` to `0.6.6`.
# Version 0.1.3

# Version 0.7.1

- Bump `crossbeam-utils` to `0.6.5`.

# Version 0.7.0

- Remove `ArcCell`, `MsQueue`, and `TreiberStack`.
- Change the interface of `ShardedLock` to match `RwLock`.
- Add `SegQueue::len()`.
- Rename `SegQueue::try_pop()` to `SegQueue::pop()`.
- Change the return type of `SegQueue::pop()` to `Result`.
- Introduce `ArrayQueue`.
- Update dependencies.

# Version 0.6.0

- Update dependencies.

# Version 0.5.0

- Update `crossbeam-channel` to 0.3.
- Update `crossbeam-utils` to 0.6.
- Add `AtomicCell`, `SharedLock`, and `WaitGroup`.

# Version 0.4.1

- Fix a double-free bug in `MsQueue` and `SegQueue`.

# Version 0.4
- Remove dependency on `cfg-if`. (#1072)

- Switch to the new implementation of epoch-based reclamation in
[`crossbeam-epoch`](https://github.com/crossbeam-rs/crossbeam-epoch), fixing numerous bugs in the
old implementation. Its API is changed in a backward-incompatible way.
- Switch to the new implementation of `CachePadded` and scoped thread in
[`crossbeam-utils`](https://github.com/crossbeam-rs/crossbeam-utils). The scoped thread API is
changed in a backward-incompatible way.
- Switch to the new implementation of Chase-Lev deque in
[`crossbeam-deque`](https://github.com/crossbeam-rs/crossbeam-deque). Its API is changed in a
backward-incompatible way.
- Export channel implemented in
[`crossbeam-channel`](https://github.com/crossbeam-rs/crossbeam-channel).
- Remove `AtomicOption`.
- Implement `Default` and `From` traits.
# Version 0.1.2

# Version 0.3
- Bump the minimum supported Rust version to 1.61. (#1037)
- Add `compare_insert`. (#976)
- Improve support for targets without atomic CAS. (#1037)
- Remove build script. (#1037)
- Remove dependency on `scopeguard`. (#1045)

- Introduced `ScopedThreadBuilder` with the ability to name threads and set stack size
- `Worker` methods in the Chase-Lev deque don't require mutable access anymore
- Fixed a bug when unblocking `pop()` in `MsQueue`
- Implemented `Drop` for `MsQueue`, `SegQueue`, and `TreiberStack`
- Implemented `Default` for `TreiberStack`
- Added `is_empty` to `SegQueue`
- Renamed `mem::epoch` to `epoch`
- Other bug fixes
# Version 0.1.1

# Version 0.2
- Fix `get_unchecked` panic by raw pointer calculation. (#940)

- Changed existing non-blocking `pop` methods to `try_pop`
- Added blocking `pop` support to Michael-Scott queue
- Added Chase-Lev work-stealing deque
# Version 0.1.0

# Version 0.1
**Note:** This release has been yanked due to bug fixed in 0.1.1.

- Added [epoch-based memory management](http://aturon.github.io/blog/2015/08/27/epoch/)
- Added Michael-Scott queue
- Added Segmented array queue
- Initial implementation.
73 changes: 18 additions & 55 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,76 +1,39 @@
[package]
name = "crossbeam"
name = "crossbeam-skiplist-fd"
# When publishing a new version:
# - Update CHANGELOG.md
# - Update README.md (when increasing major or minor version)
# - Run './tools/publish.sh crossbeam <version>'
version = "0.8.4"
version = "0.1.4"
edition = "2021"
rust-version = "1.61"
rust-version = "1.81"
license = "MIT OR Apache-2.0"
repository = "https://github.com/crossbeam-rs/crossbeam"
homepage = "https://github.com/crossbeam-rs/crossbeam"
description = "Tools for concurrent programming"
keywords = ["atomic", "garbage", "non-blocking", "lock-free", "rcu"]
categories = ["concurrency", "memory-management", "data-structures", "no-std"]
exclude = ["/.*", "/ci", "/tools"]
repository = "https://github.com/al8n/crossbeam"
homepage = "https://github.com/al8n/crossbeam/tree/crossbeam-skiplist-fd"
description = "A long-term maintained forked version of the crossbeam-skiplist for supporting more flexible key comparison customization."
keywords = ["map", "set", "skiplist", "lock-free"]
categories = ["algorithms", "concurrency", "data-structures", "no-std"]

[features]
default = ["std"]

# Enable to use APIs that require `std`.
# This is enabled by default.
std = [
"alloc",
"crossbeam-channel/std",
"crossbeam-deque/std",
"crossbeam-epoch/std",
"crossbeam-queue/std",
"crossbeam-utils/std",
]
std = ["alloc", "crossbeam-epoch/std", "crossbeam-utils/std", "dbutils/std"]

# Enable to use APIs that require `alloc`.
# This is enabled by default and also enabled if the `std` feature is enabled.
alloc = ["crossbeam-epoch/alloc", "crossbeam-queue/alloc"]
#
# NOTE: Disabling both `std` *and* `alloc` features is not supported yet.
alloc = ["crossbeam-epoch/alloc", "dbutils/alloc"]

[dependencies]
crossbeam-channel = { version = "0.5.10", path = "crossbeam-channel", default-features = false, optional = true }
crossbeam-deque = { version = "0.8.4", path = "crossbeam-deque", default-features = false, optional = true }
crossbeam-epoch = { version = "0.9.17", path = "crossbeam-epoch", default-features = false, optional = true }
crossbeam-queue = { version = "0.3.10", path = "crossbeam-queue", default-features = false, optional = true }
crossbeam-utils = { version = "0.8.18", path = "crossbeam-utils", default-features = false, features = ["atomic"] }
crossbeam-epoch = { version = "0.9", default-features = false }
crossbeam-utils = { version = "0.8", default-features = false }
dbutils = { version = "0.12", default-features = false }
equivalent-flipped = "1"

[dev-dependencies]
rand = "0.8"

[lints]
workspace = true

[workspace]
resolver = "2"
members = [
".",
"crossbeam-channel",
"crossbeam-channel/benchmarks",
"crossbeam-deque",
"crossbeam-epoch",
"crossbeam-queue",
"crossbeam-skiplist",
"crossbeam-utils",
]

[workspace.lints.rust]
missing_debug_implementations = "warn"
rust_2018_idioms = "warn"
single_use_lifetimes = "warn"
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(crossbeam_loom)',
'cfg(crossbeam_sanitize)',
] }
unreachable_pub = "warn"
# unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV
[workspace.lints.clippy]
# Suppress buggy or noisy clippy lints
declare_interior_mutable_const = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7665
incompatible_msrv = { level = "allow", priority = 1 } # buggy: doesn't consider cfg, https://github.com/rust-lang/rust-clippy/issues/12280, https://github.com/rust-lang/rust-clippy/issues/12257#issuecomment-2093667187
lint_groups_priority = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/12920
# [lints]
# workspace = true
Loading

0 comments on commit bdaa1a5

Please sign in to comment.