{"action":"created","issue":{"url":"https://api.github.com/repos/framed-data/std/issues/19","repository_url":"https://api.github.com/repos/framed-data/std","labels_url":"https://api.github.com/repos/framed-data/std/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/framed-data/std/issues/19/comments","events_url":"https://api.github.com/repos/framed-data/std/issues/19/events","html_url":"https://github.com/framed-data/std/pull/19","id":136256815,"number":19,"title":"Add support for move-and-replace","user":{"login":"elliot42","id":127919,"avatar_url":"https://avatars.githubusercontent.com/u/127919?v=3","gravatar_id":"","url":"https://api.github.com/users/elliot42","html_url":"https://github.com/elliot42","followers_url":"https://api.github.com/users/elliot42/followers","following_url":"https://api.github.com/users/elliot42/following{/other_user}","gists_url":"https://api.github.com/users/elliot42/gists{/gist_id}","starred_url":"https://api.github.com/users/elliot42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliot42/subscriptions","organizations_url":"https://api.github.com/users/elliot42/orgs","repos_url":"https://api.github.com/users/elliot42/repos","events_url":"https://api.github.com/users/elliot42/events{/privacy}","received_events_url":"https://api.github.com/users/elliot42/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-02-25T02:32:25Z","updated_at":"2016-02-26T21:40:55Z","closed_at":"2016-02-25T02:34:46Z","pull_request":{"url":"https://api.github.com/repos/framed-data/std/pulls/19","html_url":"https://github.com/framed-data/std/pull/19","diff_url":"https://github.com/framed-data/std/pull/19.diff","patch_url":"https://github.com/framed-data/std/pull/19.patch"},"body":"Prior to this commit we had `std.io/move`, which only allowed for\r\nmove-and-throw-if-already-present.  This commit adds support for\r\nmove-and-replace-if-already-present, which allows us to gracefully\r\nhandle some of the exceptions we're seeing (multiple calls issued to\r\nmoved to the same destination, presumably by multiple racing threads,\r\nand all but the first threads throwing)."},"comment":{"url":"https://api.github.com/repos/framed-data/std/issues/comments/189492181","html_url":"https://github.com/framed-data/std/pull/19#issuecomment-189492181","issue_url":"https://api.github.com/repos/framed-data/std/issues/19","id":189492181,"user":{"login":"elliot42","id":127919,"avatar_url":"https://avatars.githubusercontent.com/u/127919?v=3","gravatar_id":"","url":"https://api.github.com/users/elliot42","html_url":"https://github.com/elliot42","followers_url":"https://api.github.com/users/elliot42/followers","following_url":"https://api.github.com/users/elliot42/following{/other_user}","gists_url":"https://api.github.com/users/elliot42/gists{/gist_id}","starred_url":"https://api.github.com/users/elliot42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliot42/subscriptions","organizations_url":"https://api.github.com/users/elliot42/orgs","repos_url":"https://api.github.com/users/elliot42/repos","events_url":"https://api.github.com/users/elliot42/events{/privacy}","received_events_url":"https://api.github.com/users/elliot42/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T21:40:55Z","updated_at":"2016-02-26T21:40:55Z","body":"I don't see why you couldn't have\r\n\r\n    locks :: Atom[Map[Key, Atom]]\r\n\r\n```clj\r\n(defn lock! [k]\r\n   (compare-and-set! (get @locks k) false true))\r\n\r\n(defn unlock! [k]\r\n   (compare-and-set! (get @locks k) true false))\r\n```\r\n\r\n"}}