{"action":"closed","number":129,"pull_request":{"url":"https://api.github.com/repos/mmcgrana/gobyexample/pulls/129","id":65077686,"html_url":"https://github.com/mmcgrana/gobyexample/pull/129","diff_url":"https://github.com/mmcgrana/gobyexample/pull/129.diff","patch_url":"https://github.com/mmcgrana/gobyexample/pull/129.patch","issue_url":"https://api.github.com/repos/mmcgrana/gobyexample/issues/129","number":129,"state":"closed","locked":false,"title":"Add sleep in atomic-counter to make it run ~1 time/ms","user":{"login":"aaronbbrown","id":469234,"avatar_url":"https://avatars.githubusercontent.com/u/469234?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronbbrown","html_url":"https://github.com/aaronbbrown","followers_url":"https://api.github.com/users/aaronbbrown/followers","following_url":"https://api.github.com/users/aaronbbrown/following{/other_user}","gists_url":"https://api.github.com/users/aaronbbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronbbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronbbrown/subscriptions","organizations_url":"https://api.github.com/users/aaronbbrown/orgs","repos_url":"https://api.github.com/users/aaronbbrown/repos","events_url":"https://api.github.com/users/aaronbbrown/events{/privacy}","received_events_url":"https://api.github.com/users/aaronbbrown/received_events","type":"User","site_admin":true},"body":"As written, the atomic-counter example runs in a tight loop, saturating all CPU cores and returning a very high value:\n\n```\n$ go run atomic-counters.go\nops: 5159303\n```\n\nThe comment mentions running approximately, once a millisecond for which the code has no such constraint.  I added an explicit `time.Sleep(time.Millisecond)` here and now the correct value is returned:\n\n```\n$ go run atomic-counters.go\nops: 40350\n```\n\n@mmcgrana thanks so much for building this.  It has been a great introduction to Go for me! 💯 \n","created_at":"2016-04-03T19:24:54Z","updated_at":"2016-12-27T20:23:30Z","closed_at":"2016-12-27T20:23:30Z","merged_at":null,"merge_commit_sha":"7c02b118e13d2673294c93d6763709bf4e92e998","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mmcgrana/gobyexample/pulls/129/commits","review_comments_url":"https://api.github.com/repos/mmcgrana/gobyexample/pulls/129/comments","review_comment_url":"https://api.github.com/repos/mmcgrana/gobyexample/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mmcgrana/gobyexample/issues/129/comments","statuses_url":"https://api.github.com/repos/mmcgrana/gobyexample/statuses/3b40016a2813f2ea5e6b897ea59fa0e4c1abebf7","head":{"label":"aaronbbrown:atomic-sleep","ref":"atomic-sleep","sha":"3b40016a2813f2ea5e6b897ea59fa0e4c1abebf7","user":{"login":"aaronbbrown","id":469234,"avatar_url":"https://avatars.githubusercontent.com/u/469234?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronbbrown","html_url":"https://github.com/aaronbbrown","followers_url":"https://api.github.com/users/aaronbbrown/followers","following_url":"https://api.github.com/users/aaronbbrown/following{/other_user}","gists_url":"https://api.github.com/users/aaronbbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronbbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronbbrown/subscriptions","organizations_url":"https://api.github.com/users/aaronbbrown/orgs","repos_url":"https://api.github.com/users/aaronbbrown/repos","events_url":"https://api.github.com/users/aaronbbrown/events{/privacy}","received_events_url":"https://api.github.com/users/aaronbbrown/received_events","type":"User","site_admin":true},"repo":{"id":55363743,"name":"gobyexample","full_name":"aaronbbrown/gobyexample","owner":{"login":"aaronbbrown","id":469234,"avatar_url":"https://avatars.githubusercontent.com/u/469234?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronbbrown","html_url":"https://github.com/aaronbbrown","followers_url":"https://api.github.com/users/aaronbbrown/followers","following_url":"https://api.github.com/users/aaronbbrown/following{/other_user}","gists_url":"https://api.github.com/users/aaronbbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronbbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronbbrown/subscriptions","organizations_url":"https://api.github.com/users/aaronbbrown/orgs","repos_url":"https://api.github.com/users/aaronbbrown/repos","events_url":"https://api.github.com/users/aaronbbrown/events{/privacy}","received_events_url":"https://api.github.com/users/aaronbbrown/received_events","type":"User","site_admin":true},"private":false,"html_url":"https://github.com/aaronbbrown/gobyexample","description":"Go by Example","fork":true,"url":"https://api.github.com/repos/aaronbbrown/gobyexample","forks_url":"https://api.github.com/repos/aaronbbrown/gobyexample/forks","keys_url":"https://api.github.com/repos/aaronbbrown/gobyexample/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaronbbrown/gobyexample/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaronbbrown/gobyexample/teams","hooks_url":"https://api.github.com/repos/aaronbbrown/gobyexample/hooks","issue_events_url":"https://api.github.com/repos/aaronbbrown/gobyexample/issues/events{/number}","events_url":"https://api.github.com/repos/aaronbbrown/gobyexample/events","assignees_url":"https://api.github.com/repos/aaronbbrown/gobyexample/assignees{/user}","branches_url":"https://api.github.com/repos/aaronbbrown/gobyexample/branches{/branch}","tags_url":"https://api.github.com/repos/aaronbbrown/gobyexample/tags","blobs_url":"https://api.github.com/repos/aaronbbrown/gobyexample/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaronbbrown/gobyexample/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaronbbrown/gobyexample/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaronbbrown/gobyexample/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaronbbrown/gobyexample/statuses/{sha}","languages_url":"https://api.github.com/repos/aaronbbrown/gobyexample/languages","stargazers_url":"https://api.github.com/repos/aaronbbrown/gobyexample/stargazers","contributors_url":"https://api.github.com/repos/aaronbbrown/gobyexample/contributors","subscribers_url":"https://api.github.com/repos/aaronbbrown/gobyexample/subscribers","subscription_url":"https://api.github.com/repos/aaronbbrown/gobyexample/subscription","commits_url":"https://api.github.com/repos/aaronbbrown/gobyexample/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaronbbrown/gobyexample/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaronbbrown/gobyexample/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaronbbrown/gobyexample/issues/comments{/number}","contents_url":"https://api.github.com/repos/aaronbbrown/gobyexample/contents/{+path}","compare_url":"https://api.github.com/repos/aaronbbrown/gobyexample/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaronbbrown/gobyexample/merges","archive_url":"https://api.github.com/repos/aaronbbrown/gobyexample/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaronbbrown/gobyexample/downloads","issues_url":"https://api.github.com/repos/aaronbbrown/gobyexample/issues{/number}","pulls_url":"https://api.github.com/repos/aaronbbrown/gobyexample/pulls{/number}","milestones_url":"https://api.github.com/repos/aaronbbrown/gobyexample/milestones{/number}","notifications_url":"https://api.github.com/repos/aaronbbrown/gobyexample/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaronbbrown/gobyexample/labels{/name}","releases_url":"https://api.github.com/repos/aaronbbrown/gobyexample/releases{/id}","deployments_url":"https://api.github.com/repos/aaronbbrown/gobyexample/deployments","created_at":"2016-04-03T19:08:26Z","updated_at":"2016-04-03T19:08:27Z","pushed_at":"2016-04-03T20:15:24Z","git_url":"git://github.com/aaronbbrown/gobyexample.git","ssh_url":"git@github.com:aaronbbrown/gobyexample.git","clone_url":"https://github.com/aaronbbrown/gobyexample.git","svn_url":"https://github.com/aaronbbrown/gobyexample","homepage":"https://gobyexample.com","size":4279,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"mmcgrana:master","ref":"master","sha":"d3d265b3e42ef75afd25a0fed295f8a13a026d3e","user":{"login":"mmcgrana","id":2432,"avatar_url":"https://avatars.githubusercontent.com/u/2432?v=3","gravatar_id":"","url":"https://api.github.com/users/mmcgrana","html_url":"https://github.com/mmcgrana","followers_url":"https://api.github.com/users/mmcgrana/followers","following_url":"https://api.github.com/users/mmcgrana/following{/other_user}","gists_url":"https://api.github.com/users/mmcgrana/gists{/gist_id}","starred_url":"https://api.github.com/users/mmcgrana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmcgrana/subscriptions","organizations_url":"https://api.github.com/users/mmcgrana/orgs","repos_url":"https://api.github.com/users/mmcgrana/repos","events_url":"https://api.github.com/users/mmcgrana/events{/privacy}","received_events_url":"https://api.github.com/users/mmcgrana/received_events","type":"User","site_admin":false},"repo":{"id":5896437,"name":"gobyexample","full_name":"mmcgrana/gobyexample","owner":{"login":"mmcgrana","id":2432,"avatar_url":"https://avatars.githubusercontent.com/u/2432?v=3","gravatar_id":"","url":"https://api.github.com/users/mmcgrana","html_url":"https://github.com/mmcgrana","followers_url":"https://api.github.com/users/mmcgrana/followers","following_url":"https://api.github.com/users/mmcgrana/following{/other_user}","gists_url":"https://api.github.com/users/mmcgrana/gists{/gist_id}","starred_url":"https://api.github.com/users/mmcgrana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmcgrana/subscriptions","organizations_url":"https://api.github.com/users/mmcgrana/orgs","repos_url":"https://api.github.com/users/mmcgrana/repos","events_url":"https://api.github.com/users/mmcgrana/events{/privacy}","received_events_url":"https://api.github.com/users/mmcgrana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mmcgrana/gobyexample","description":"Go by Example","fork":false,"url":"https://api.github.com/repos/mmcgrana/gobyexample","forks_url":"https://api.github.com/repos/mmcgrana/gobyexample/forks","keys_url":"https://api.github.com/repos/mmcgrana/gobyexample/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mmcgrana/gobyexample/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mmcgrana/gobyexample/teams","hooks_url":"https://api.github.com/repos/mmcgrana/gobyexample/hooks","issue_events_url":"https://api.github.com/repos/mmcgrana/gobyexample/issues/events{/number}","events_url":"https://api.github.com/repos/mmcgrana/gobyexample/events","assignees_url":"https://api.github.com/repos/mmcgrana/gobyexample/assignees{/user}","branches_url":"https://api.github.com/repos/mmcgrana/gobyexample/branches{/branch}","tags_url":"https://api.github.com/repos/mmcgrana/gobyexample/tags","blobs_url":"https://api.github.com/repos/mmcgrana/gobyexample/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mmcgrana/gobyexample/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mmcgrana/gobyexample/git/refs{/sha}","trees_url":"https://api.github.com/repos/mmcgrana/gobyexample/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mmcgrana/gobyexample/statuses/{sha}","languages_url":"https://api.github.com/repos/mmcgrana/gobyexample/languages","stargazers_url":"https://api.github.com/repos/mmcgrana/gobyexample/stargazers","contributors_url":"https://api.github.com/repos/mmcgrana/gobyexample/contributors","subscribers_url":"https://api.github.com/repos/mmcgrana/gobyexample/subscribers","subscription_url":"https://api.github.com/repos/mmcgrana/gobyexample/subscription","commits_url":"https://api.github.com/repos/mmcgrana/gobyexample/commits{/sha}","git_commits_url":"https://api.github.com/repos/mmcgrana/gobyexample/git/commits{/sha}","comments_url":"https://api.github.com/repos/mmcgrana/gobyexample/comments{/number}","issue_comment_url":"https://api.github.com/repos/mmcgrana/gobyexample/issues/comments{/number}","contents_url":"https://api.github.com/repos/mmcgrana/gobyexample/contents/{+path}","compare_url":"https://api.github.com/repos/mmcgrana/gobyexample/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mmcgrana/gobyexample/merges","archive_url":"https://api.github.com/repos/mmcgrana/gobyexample/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mmcgrana/gobyexample/downloads","issues_url":"https://api.github.com/repos/mmcgrana/gobyexample/issues{/number}","pulls_url":"https://api.github.com/repos/mmcgrana/gobyexample/pulls{/number}","milestones_url":"https://api.github.com/repos/mmcgrana/gobyexample/milestones{/number}","notifications_url":"https://api.github.com/repos/mmcgrana/gobyexample/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mmcgrana/gobyexample/labels{/name}","releases_url":"https://api.github.com/repos/mmcgrana/gobyexample/releases{/id}","deployments_url":"https://api.github.com/repos/mmcgrana/gobyexample/deployments","created_at":"2012-09-21T03:47:46Z","updated_at":"2016-12-26T23:31:15Z","pushed_at":"2016-12-27T19:59:20Z","git_url":"git://github.com/mmcgrana/gobyexample.git","ssh_url":"git@github.com:mmcgrana/gobyexample.git","clone_url":"https://github.com/mmcgrana/gobyexample.git","svn_url":"https://github.com/mmcgrana/gobyexample","homepage":"https://gobyexample.com","size":5714,"stargazers_count":1848,"watchers_count":1848,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":382,"mirror_url":null,"open_issues_count":9,"forks":382,"open_issues":9,"watchers":1848,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mmcgrana/gobyexample/pulls/129"},"html":{"href":"https://github.com/mmcgrana/gobyexample/pull/129"},"issue":{"href":"https://api.github.com/repos/mmcgrana/gobyexample/issues/129"},"comments":{"href":"https://api.github.com/repos/mmcgrana/gobyexample/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/mmcgrana/gobyexample/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/mmcgrana/gobyexample/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mmcgrana/gobyexample/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/mmcgrana/gobyexample/statuses/3b40016a2813f2ea5e6b897ea59fa0e4c1abebf7"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"mmcgrana"}}