{"action":"created","comment":{"url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/comments/92258278","pull_request_review_id":12770594,"id":92258278,"diff_hunk":"@@ -82,3 +82,39 @@ type State<'TModel,'TMsg> (initialState : 'TModel, update : 'TMsg -> 'TModel ->\n         member this.Dispose() = \n             (signal :?> System.IDisposable).Dispose()            \n             GC.SuppressFinalize this\n+\n+/// A wrapper for a mutable value with change notification, based on/derived from clojure's Atoms\n+type AtomicMutable<'a>(value : 'a) =\n+    let v = ref value\n+\n+    let rec setValue newValue =\n+        let result = Interlocked.CompareExchange<'a>(v, newValue, !v)\n+        if obj.ReferenceEquals result !v then ()\n+        else Thread.SpinWait 20; setValue newValue\n+\n+    // Stores dependencies remotely to not use any space in the object (no memory overhead requirements)\n+    member private this.Dependencies with get() = Dependencies.createRemote this\n+    \n+    /// Gets and sets the Value contained within this mutable\n+    member this.Value \n+        with get() = !v\n+        and set(value) =\n+            setValue value","path":"src/Gjallarhorn/State.fs","position":21,"original_position":21,"commit_id":"c0d7856333b0899fa2c5c9113f9d8f0f17e9980b","original_commit_id":"c0d7856333b0899fa2c5c9113f9d8f0f17e9980b","user":{"login":"ReedCopsey","id":5280922,"avatar_url":"https://avatars.githubusercontent.com/u/5280922?v=3","gravatar_id":"","url":"https://api.github.com/users/ReedCopsey","html_url":"https://github.com/ReedCopsey","followers_url":"https://api.github.com/users/ReedCopsey/followers","following_url":"https://api.github.com/users/ReedCopsey/following{/other_user}","gists_url":"https://api.github.com/users/ReedCopsey/gists{/gist_id}","starred_url":"https://api.github.com/users/ReedCopsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReedCopsey/subscriptions","organizations_url":"https://api.github.com/users/ReedCopsey/orgs","repos_url":"https://api.github.com/users/ReedCopsey/repos","events_url":"https://api.github.com/users/ReedCopsey/events{/privacy}","received_events_url":"https://api.github.com/users/ReedCopsey/received_events","type":"User","site_admin":false},"body":"It seems like having a version that just does the exchange directly makes sense.  CompareExchange is only really needed for swap type of functionality, since that relies on knowing that the value hasn't changed yet.","created_at":"2016-12-13T20:24:37Z","updated_at":"2016-12-13T20:24:37Z","html_url":"https://github.com/ReedCopsey/Gjallarhorn/pull/28#discussion_r92258278","pull_request_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/comments/92258278"},"html":{"href":"https://github.com/ReedCopsey/Gjallarhorn/pull/28#discussion_r92258278"},"pull_request":{"href":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/28","id":97822285,"html_url":"https://github.com/ReedCopsey/Gjallarhorn/pull/28","diff_url":"https://github.com/ReedCopsey/Gjallarhorn/pull/28.diff","patch_url":"https://github.com/ReedCopsey/Gjallarhorn/pull/28.patch","issue_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/issues/28","number":28,"state":"open","locked":false,"title":"add AtomicMutable<'a> to State.fs fixes #15","user":{"login":"jeroldhaas","id":835976,"avatar_url":"https://avatars.githubusercontent.com/u/835976?v=3","gravatar_id":"","url":"https://api.github.com/users/jeroldhaas","html_url":"https://github.com/jeroldhaas","followers_url":"https://api.github.com/users/jeroldhaas/followers","following_url":"https://api.github.com/users/jeroldhaas/following{/other_user}","gists_url":"https://api.github.com/users/jeroldhaas/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroldhaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroldhaas/subscriptions","organizations_url":"https://api.github.com/users/jeroldhaas/orgs","repos_url":"https://api.github.com/users/jeroldhaas/repos","events_url":"https://api.github.com/users/jeroldhaas/events{/privacy}","received_events_url":"https://api.github.com/users/jeroldhaas/received_events","type":"User","site_admin":false},"body":"Please review - a test on its performance / accuracy is likely needed.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/reedcopsey/gjallarhorn/28)\n<!-- Reviewable:end -->\n","created_at":"2016-12-13T19:49:54Z","updated_at":"2016-12-13T20:24:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"613044afcfe2a47dbfa7379aec8ee291899df662","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/28/commits","review_comments_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/28/comments","review_comment_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/issues/28/comments","statuses_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/statuses/c0d7856333b0899fa2c5c9113f9d8f0f17e9980b","head":{"label":"jeroldhaas:feature-15","ref":"feature-15","sha":"c0d7856333b0899fa2c5c9113f9d8f0f17e9980b","user":{"login":"jeroldhaas","id":835976,"avatar_url":"https://avatars.githubusercontent.com/u/835976?v=3","gravatar_id":"","url":"https://api.github.com/users/jeroldhaas","html_url":"https://github.com/jeroldhaas","followers_url":"https://api.github.com/users/jeroldhaas/followers","following_url":"https://api.github.com/users/jeroldhaas/following{/other_user}","gists_url":"https://api.github.com/users/jeroldhaas/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroldhaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroldhaas/subscriptions","organizations_url":"https://api.github.com/users/jeroldhaas/orgs","repos_url":"https://api.github.com/users/jeroldhaas/repos","events_url":"https://api.github.com/users/jeroldhaas/events{/privacy}","received_events_url":"https://api.github.com/users/jeroldhaas/received_events","type":"User","site_admin":false},"repo":{"id":27096585,"name":"Gjallarhorn","full_name":"jeroldhaas/Gjallarhorn","owner":{"login":"jeroldhaas","id":835976,"avatar_url":"https://avatars.githubusercontent.com/u/835976?v=3","gravatar_id":"","url":"https://api.github.com/users/jeroldhaas","html_url":"https://github.com/jeroldhaas","followers_url":"https://api.github.com/users/jeroldhaas/followers","following_url":"https://api.github.com/users/jeroldhaas/following{/other_user}","gists_url":"https://api.github.com/users/jeroldhaas/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroldhaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroldhaas/subscriptions","organizations_url":"https://api.github.com/users/jeroldhaas/orgs","repos_url":"https://api.github.com/users/jeroldhaas/repos","events_url":"https://api.github.com/users/jeroldhaas/events{/privacy}","received_events_url":"https://api.github.com/users/jeroldhaas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeroldhaas/Gjallarhorn","description":"Gjallarhorn is a small, lightweight framework for managing mutable state when notifications are required.","fork":true,"url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn","forks_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/forks","keys_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/teams","hooks_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/hooks","issue_events_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/issues/events{/number}","events_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/events","assignees_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/assignees{/user}","branches_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/branches{/branch}","tags_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/tags","blobs_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/statuses/{sha}","languages_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/languages","stargazers_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/stargazers","contributors_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/contributors","subscribers_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/subscribers","subscription_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/subscription","commits_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/contents/{+path}","compare_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/merges","archive_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/downloads","issues_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/issues{/number}","pulls_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/pulls{/number}","milestones_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/milestones{/number}","notifications_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/labels{/name}","releases_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/releases{/id}","deployments_url":"https://api.github.com/repos/jeroldhaas/Gjallarhorn/deployments","created_at":"2014-11-24T21:45:23Z","updated_at":"2016-12-13T03:38:41Z","pushed_at":"2016-12-13T19:48:26Z","git_url":"git://github.com/jeroldhaas/Gjallarhorn.git","ssh_url":"git@github.com:jeroldhaas/Gjallarhorn.git","clone_url":"https://github.com/jeroldhaas/Gjallarhorn.git","svn_url":"https://github.com/jeroldhaas/Gjallarhorn","homepage":"http://ReedCopsey.github.io/Gjallarhorn","size":666,"stargazers_count":0,"watchers_count":0,"language":"F#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ReedCopsey:master","ref":"master","sha":"55ef740730d55198af3815eaf0551cef7d1a8071","user":{"login":"ReedCopsey","id":5280922,"avatar_url":"https://avatars.githubusercontent.com/u/5280922?v=3","gravatar_id":"","url":"https://api.github.com/users/ReedCopsey","html_url":"https://github.com/ReedCopsey","followers_url":"https://api.github.com/users/ReedCopsey/followers","following_url":"https://api.github.com/users/ReedCopsey/following{/other_user}","gists_url":"https://api.github.com/users/ReedCopsey/gists{/gist_id}","starred_url":"https://api.github.com/users/ReedCopsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReedCopsey/subscriptions","organizations_url":"https://api.github.com/users/ReedCopsey/orgs","repos_url":"https://api.github.com/users/ReedCopsey/repos","events_url":"https://api.github.com/users/ReedCopsey/events{/privacy}","received_events_url":"https://api.github.com/users/ReedCopsey/received_events","type":"User","site_admin":false},"repo":{"id":25609222,"name":"Gjallarhorn","full_name":"ReedCopsey/Gjallarhorn","owner":{"login":"ReedCopsey","id":5280922,"avatar_url":"https://avatars.githubusercontent.com/u/5280922?v=3","gravatar_id":"","url":"https://api.github.com/users/ReedCopsey","html_url":"https://github.com/ReedCopsey","followers_url":"https://api.github.com/users/ReedCopsey/followers","following_url":"https://api.github.com/users/ReedCopsey/following{/other_user}","gists_url":"https://api.github.com/users/ReedCopsey/gists{/gist_id}","starred_url":"https://api.github.com/users/ReedCopsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReedCopsey/subscriptions","organizations_url":"https://api.github.com/users/ReedCopsey/orgs","repos_url":"https://api.github.com/users/ReedCopsey/repos","events_url":"https://api.github.com/users/ReedCopsey/events{/privacy}","received_events_url":"https://api.github.com/users/ReedCopsey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ReedCopsey/Gjallarhorn","description":"Gjallarhorn is a small, lightweight framework for managing mutable state when notifications are required.","fork":false,"url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn","forks_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/forks","keys_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/teams","hooks_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/hooks","issue_events_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/issues/events{/number}","events_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/events","assignees_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/assignees{/user}","branches_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/branches{/branch}","tags_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/tags","blobs_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/git/refs{/sha}","trees_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/statuses/{sha}","languages_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/languages","stargazers_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/stargazers","contributors_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/contributors","subscribers_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/subscribers","subscription_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/subscription","commits_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/commits{/sha}","git_commits_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/git/commits{/sha}","comments_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/comments{/number}","issue_comment_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/issues/comments{/number}","contents_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/contents/{+path}","compare_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/merges","archive_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/downloads","issues_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/issues{/number}","pulls_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls{/number}","milestones_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/milestones{/number}","notifications_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/labels{/name}","releases_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/releases{/id}","deployments_url":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/deployments","created_at":"2014-10-22T23:23:10Z","updated_at":"2016-12-09T06:31:42Z","pushed_at":"2016-12-13T19:49:54Z","git_url":"git://github.com/ReedCopsey/Gjallarhorn.git","ssh_url":"git@github.com:ReedCopsey/Gjallarhorn.git","clone_url":"https://github.com/ReedCopsey/Gjallarhorn.git","svn_url":"https://github.com/ReedCopsey/Gjallarhorn","homepage":"http://ReedCopsey.github.io/Gjallarhorn","size":981,"stargazers_count":33,"watchers_count":33,"language":"F#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":9,"mirror_url":null,"open_issues_count":5,"forks":9,"open_issues":5,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/28"},"html":{"href":"https://github.com/ReedCopsey/Gjallarhorn/pull/28"},"issue":{"href":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/issues/28"},"comments":{"href":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/ReedCopsey/Gjallarhorn/statuses/c0d7856333b0899fa2c5c9113f9d8f0f17e9980b"}}}}
{"actor":{"display_login":"ReedCopsey"}}