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

Explain the atomic orderings used in race #175

Closed Kestrer closed 2 years ago

Kestrer commented 2 years ago

I believe this is the correct rationale as to why those atomic orderings were chosen in this module. This change also makes it explicit that those orderings are used in the library's public API, better allowing consumers to safely depend on it.

matklad commented 2 years ago

Good call! We indeed should document acq/rel guarantee!

matklad commented 2 years ago

bors d+

bors[bot] commented 2 years ago

:v: Kestrer can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

Kestrer commented 2 years ago

bors r+

bors[bot] commented 2 years ago

Build succeeded: