matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.84k stars 110 forks source link

Use AtomicPtr for race::OnceRef to avoid ptr-int-ptr #219

Closed Imberflur closed 1 year ago

Imberflur commented 1 year ago

Same rationale as https://github.com/matklad/once_cell/pull/185

Potentially, a OncePtr abstraction could be factored out and used in both OnceBox and OnceRef.

matklad commented 1 year ago

Yeah, this makes sense!

bors r+

bors[bot] commented 1 year ago

Build succeeded: