moka-rs / moka

A high performance concurrent caching library for Rust
Apache License 2.0
1.63k stars 73 forks source link

Switch from `triomphe::Arc` to `MiniArc`, our own `Arc` implementation #456

Open tatsuya6502 opened 2 months ago

tatsuya6502 commented 2 months ago

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

MiniArc replaces all triomphe::Arc usages in moka.

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

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 90.61033% with 20 lines in your changes missing coverage. Please review.

Project coverage is 94.73%. Comparing base (bd5e447) to head (14651ee). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #456 +/- ## ========================================== - Coverage 94.79% 94.73% -0.07% ========================================== Files 44 45 +1 Lines 20306 20416 +110 ========================================== + Hits 19249 19341 +92 - Misses 1057 1075 +18 ```