{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/32967","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/32967/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/32967/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/32967/events","html_url":"https://github.com/rust-lang/rust/issues/32967","id":148471406,"number":32967,"title":"Current atomics are not defined to be lock-free","user":{"login":"brson","id":147214,"avatar_url":"https://avatars.githubusercontent.com/u/147214?v=3","gravatar_id":"","url":"https://api.github.com/users/brson","html_url":"https://github.com/brson","followers_url":"https://api.github.com/users/brson/followers","following_url":"https://api.github.com/users/brson/following{/other_user}","gists_url":"https://api.github.com/users/brson/gists{/gist_id}","starred_url":"https://api.github.com/users/brson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brson/subscriptions","organizations_url":"https://api.github.com/users/brson/orgs","repos_url":"https://api.github.com/users/brson/repos","events_url":"https://api.github.com/users/brson/events{/privacy}","received_events_url":"https://api.github.com/users/brson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-lang","name":"A-lang","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-libs","name":"A-libs","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-14T20:18:45Z","updated_at":"2016-04-15T09:36:11Z","closed_at":null,"body":"Right now we define things like `AtomicPtr` unconditionally. On platforms without real atomics these get lowered to locks today. People write lock-free algorithms with these atomics that are not actually guaranteed to be lock free.\r\n\r\nFor comparison, I'm told (by @sunfish) that C++ *does* try to guarantee that atomics are lock-free.\r\n\r\ncc https://github.com/rust-lang/rfcs/pull/1543"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/210384315","html_url":"https://github.com/rust-lang/rust/issues/32967#issuecomment-210384315","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/32967","id":210384315,"user":{"login":"Amanieu","id":278509,"avatar_url":"https://avatars.githubusercontent.com/u/278509?v=3","gravatar_id":"","url":"https://api.github.com/users/Amanieu","html_url":"https://github.com/Amanieu","followers_url":"https://api.github.com/users/Amanieu/followers","following_url":"https://api.github.com/users/Amanieu/following{/other_user}","gists_url":"https://api.github.com/users/Amanieu/gists{/gist_id}","starred_url":"https://api.github.com/users/Amanieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amanieu/subscriptions","organizations_url":"https://api.github.com/users/Amanieu/orgs","repos_url":"https://api.github.com/users/Amanieu/repos","events_url":"https://api.github.com/users/Amanieu/events{/privacy}","received_events_url":"https://api.github.com/users/Amanieu/received_events","type":"User","site_admin":false},"created_at":"2016-04-15T09:36:11Z","updated_at":"2016-04-15T09:36:11Z","body":"The plan with rust-lang/rfcs#1543 is to only expose atomic types which are guaranteed to be lock-free. Non-lock free atomic types can then be built on top of those, like I did in the [atomic-rs](https://github.com/Amanieu/atomic-rs) library."}}