Skip to content

Enhance concurrency strategy with traits, tests, and documentation#9

Merged
FrozenLemonTee merged 14 commits intomainfrom
refactor-unified-concurrent-access-interface
Mar 20, 2026
Merged

Enhance concurrency strategy with traits, tests, and documentation#9
FrozenLemonTee merged 14 commits intomainfrom
refactor-unified-concurrent-access-interface

Conversation

@FrozenLemonTee
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 20, 2026 11:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the library’s concurrency strategy by replacing the previous atomic concurrency policy with a new fenced* family, extending the concurrency injection protocol to carry explicit memory orders, and adding primitive-level load/store/CAS support via concurrency handlers.

Changes:

  • Replace policy::concurrency::atomic with policy::concurrency::{fenced, fenced_relaxed, fenced_acq_rel, fenced_seq_cst} and propagate memory-order-aware fence injection.
  • Add primitive::load/store/compare_exchange implemented through the concurrency handler access protocol (backed by std::atomic_ref when supported).
  • Update tests, examples, and README documentation to cover the new policies and access protocol.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/basic/test_policies.cpp Adds coverage for new fenced policy traits, memory-order injection, and handler access availability gates.
tests/basic/test_operations.cpp Renames/updates concurrency tests from atomic to fenced and adds load/store/CAS tests (incl. concurrent CAS increments).
src/primitive/impl.cppm Adds concurrency-policy resolution/validation and introduces primitive atomic-access APIs via policy handlers.
src/policy/utility.cppm Updates concurrency priority list to prefer fenced over none.
src/policy/impl.cppm Defines new concurrency policy tags/traits and implements fenced handlers + std::atomic_ref-based access specializations.
src/policy/handler.cppm Extends concurrency::injection with memory orders and introduces the handler access protocol/availability concepts.
src/operations/invoker.cppm Threads the injected memory orders into runtime fence application.
examples/ex07_custom_policy.cpp Updates custom concurrency handler example to set the new injection memory orders.
examples/ex05_concurrency_policy.cpp Updates demo from atomic to fenced and showcases primitive load/store/CAS usage.
README.md Documents new concurrency policy set and adds a concurrency access API example.

@FrozenLemonTee FrozenLemonTee force-pushed the refactor-unified-concurrent-access-interface branch from e8ed4e1 to 6e14d3d Compare March 20, 2026 14:22
@FrozenLemonTee FrozenLemonTee merged commit 8a014af into main Mar 20, 2026
10 of 13 checks passed
@FrozenLemonTee FrozenLemonTee deleted the refactor-unified-concurrent-access-interface branch March 20, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants