Skip to content
This repository has been archived by the owner on Nov 5, 2018. It is now read-only.

Use volatile read in steal #14

Closed
wants to merge 1 commit into from
Closed

Use volatile read in steal #14

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jul 29, 2018

Since steal reads from memory that might be concurrently modified, it's better to use ptr::read_volatile than ptr::read.

A similar situation in seqlock: https://github.com/Amanieu/seqlock/blob/bccfed2f6638aeb86c1e3794d285f82153c4e487/src/lib.rs#L147

See also: rust-lang/rust#52391

@ghost ghost requested a review from jeehoonkang July 29, 2018 19:39
@ghost
Copy link
Author

ghost commented Aug 9, 2018

Closing in favor of #15

@ghost ghost closed this Aug 9, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

0 participants