Closed Imberflur closed 1 year ago
This PR replaces TrustCell with atomic_refcell::AtomicCell which provides near identical functionality.
TrustCell
atomic_refcell::AtomicCell
Advantages of this change:
atomic_refcell
unsafe
Based on top of commits from: https://github.com/amethyst/shred/pull/223 Waiting on: https://github.com/bholley/atomic_refcell/pull/18
This PR replaces
TrustCell
withatomic_refcell::AtomicCell
which provides near identical functionality.Advantages of this change:
atomic_refcell
uses an alternative strategy to handle overflows of the read counter which allows for a single atomic operation when acquiring a read guard.TrustCell
implementation reduces the amount ofunsafe
code in this crate.Based on top of commits from: https://github.com/amethyst/shred/pull/223Waiting on: https://github.com/bholley/atomic_refcell/pull/18