Skip to content

Safety of Relaxed memory ordering #1

Description

@spangaer

Hi Colin,

While studying the Rust memory model and as sidestep read-copy-update I stumbled upon your crate.

It does show remarkable performance compared to some other shared state techniques I had a stab at.

What I can't seem to get my head around is why this load would safely allow Relaxed ordering?

unsafe { &*self.0.load(Ordering::Relaxed) }

All documentation I consult on the C++20 memory model seems to indicate that a Release store requires an Acquire associated load to achieve (platform independent) memory safety?

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions