{"action":"created","issue":{"url":"https://api.github.com/repos/slide-rs/atom/issues/6","repository_url":"https://api.github.com/repos/slide-rs/atom","labels_url":"https://api.github.com/repos/slide-rs/atom/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/slide-rs/atom/issues/6/comments","events_url":"https://api.github.com/repos/slide-rs/atom/issues/6/events","html_url":"https://github.com/slide-rs/atom/pull/6","id":322365271,"number":6,"title":"Add compare_and_swap, compare_exchange, compare_exchange_weak","user":{"login":"dbkaplun","id":1765130,"avatar_url":"https://avatars2.githubusercontent.com/u/1765130?v=4","gravatar_id":"","url":"https://api.github.com/users/dbkaplun","html_url":"https://github.com/dbkaplun","followers_url":"https://api.github.com/users/dbkaplun/followers","following_url":"https://api.github.com/users/dbkaplun/following{/other_user}","gists_url":"https://api.github.com/users/dbkaplun/gists{/gist_id}","starred_url":"https://api.github.com/users/dbkaplun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbkaplun/subscriptions","organizations_url":"https://api.github.com/users/dbkaplun/orgs","repos_url":"https://api.github.com/users/dbkaplun/repos","events_url":"https://api.github.com/users/dbkaplun/events{/privacy}","received_events_url":"https://api.github.com/users/dbkaplun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-11T16:53:02Z","updated_at":"2018-05-11T16:57:03Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/slide-rs/atom/pulls/6","html_url":"https://github.com/slide-rs/atom/pull/6","diff_url":"https://github.com/slide-rs/atom/pull/6.diff","patch_url":"https://github.com/slide-rs/atom/pull/6.patch"},"body":"Closes #5, depends on #4.\r\n\r\nAdd compare_and_swap, compare_exchange, compare_exchange_weak:\r\n```rust\r\n    // https://doc.rust-lang.org/std/sync/atomic/struct.AtomicPtr.html#method.compare_and_swap\r\n    pub fn compare_and_swap(\r\n        &self,\r\n        current: Option<&P>,\r\n        new: Option<P>,\r\n        order: Ordering,\r\n    ) -> Result<Option<P>, (Option<P>, *mut P)>; // Err returns `new` back, and the current pointer in AtomicPtr.\r\n\r\n    // https://doc.rust-lang.org/std/sync/atomic/struct.AtomicPtr.html#method.compare_exchange\r\n    pub fn compare_exchange(\r\n        &self,\r\n        current: Option<&P>,\r\n        new: Option<P>,\r\n        success: Ordering,\r\n        failure: Ordering,\r\n    ) -> Result<Option<P>, (Option<P>, *mut P)>; // Err returns `new` back, and the current pointer in AtomicPtr.\r\n\r\n    // https://doc.rust-lang.org/std/sync/atomic/struct.AtomicPtr.html#method.compare_exchange_weak\r\n    pub fn compare_exchange_weak(\r\n        &self,\r\n        current: Option<&P>,\r\n        new: Option<P>,\r\n        success: Ordering,\r\n        failure: Ordering,\r\n    ) -> Result<Option<P>, (Option<P>, *mut P)>; // Err returns `new` back, and the current pointer in AtomicPtr.\r\n```\r\n\r\n[Reviewable diff](https://github.com/dbkaplun/atom/compare/safety...dbkaplun:atomicptr-methods)"},"comment":{"url":"https://api.github.com/repos/slide-rs/atom/issues/comments/388422624","html_url":"https://github.com/slide-rs/atom/pull/6#issuecomment-388422624","issue_url":"https://api.github.com/repos/slide-rs/atom/issues/6","id":388422624,"user":{"login":"dbkaplun","id":1765130,"avatar_url":"https://avatars2.githubusercontent.com/u/1765130?v=4","gravatar_id":"","url":"https://api.github.com/users/dbkaplun","html_url":"https://github.com/dbkaplun","followers_url":"https://api.github.com/users/dbkaplun/followers","following_url":"https://api.github.com/users/dbkaplun/following{/other_user}","gists_url":"https://api.github.com/users/dbkaplun/gists{/gist_id}","starred_url":"https://api.github.com/users/dbkaplun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbkaplun/subscriptions","organizations_url":"https://api.github.com/users/dbkaplun/orgs","repos_url":"https://api.github.com/users/dbkaplun/repos","events_url":"https://api.github.com/users/dbkaplun/events{/privacy}","received_events_url":"https://api.github.com/users/dbkaplun/received_events","type":"User","site_admin":false},"created_at":"2018-05-11T16:57:03Z","updated_at":"2018-05-11T16:57:03Z","author_association":"CONTRIBUTOR","body":"@torkleyy will do."}}
{"actor":{"display_login":"dbkaplun"}}