Skip to content

SPSC: Relaxed load if value is only written in same thread#4

Open
mgeier wants to merge 1 commit intoKyleMayes:masterfrom
mgeier:relax
Open

SPSC: Relaxed load if value is only written in same thread#4
mgeier wants to merge 1 commit intoKyleMayes:masterfrom
mgeier:relax

Conversation

@mgeier
Copy link

@mgeier mgeier commented Dec 10, 2023

The write index is only ever written by the producer thread, therefore there is no need for synchronization when reading it again from the producer thread.

Same for the read index and the consumer thread.

Loads for values written from the other thread still need Acquire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant