Skip to content

Replace triomphe::Arc with our own MiniArc type#47

Open
tatsuya6502 wants to merge 3 commits intov0.11.xfrom
rm-triomphe
Open

Replace triomphe::Arc with our own MiniArc type#47
tatsuya6502 wants to merge 3 commits intov0.11.xfrom
rm-triomphe

Conversation

@tatsuya6502
Copy link
Copy Markdown
Member

@tatsuya6502 tatsuya6502 commented Jan 11, 2025

This PR adds a private MiniArc type. It is a minimal implementation of atomic reference counted shared pointer. It is like a std::sync::Arc and triomphe::Arc but with a few differences:

  • No Weak references, so MiniArc does not have the weak reference counter.
  • Uses AtomicU32 instead of AtomicUsize for the strong reference counter.
  • Much smaller code size (~100 lines) by having only the necessary methods for moka and mini-moka.

MiniArc replaces all triomphe::Arc usages in moka.

On the CI (GitHub Actions), the following tests are performed in addition to the regular tests:

  • Miri tests on MiniArc.
  • Loom tests on MiniArc.

@tatsuya6502 tatsuya6502 added this to the v0.11.0 milestone Jan 11, 2025
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.

CI: Run miri using tree borrows in addition to the existing stacked borrows

1 participant