{"action":"created","comment":{"url":"https://api.github.com/repos/tuxofil/tcpcall/pulls/comments/215029526","pull_request_review_id":152207086,"id":215029526,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTAyOTUyNg==","diff_hunk":"@@ -535,17 +540,20 @@ func (p *Pool) log(format string, args ...interface{}) {\n \n // Thread safe increment of internal counter.\n func (p *Pool) hit(counter int) {\n-\tp.countersMu.Lock()\n-\tp.counters[counter]++\n-\tp.countersMu.Unlock()\n+\tp.countersMu.RLock()\n+\tatomic.AddInt64(p.counters[counter], 1)\n+\tp.countersMu.RUnlock()\n }\n \n // Return a snapshot of all internal counters.\n func (p *Pool) Counters() []int {\n \tres := make([]int, PC_COUNT)\n-\tp.countersMu.RLock()\n-\tcopy(res, p.counters)\n-\tp.countersMu.RUnlock()\n+\tp.countersMu.Lock()\n+\tfor i := range p.counters {\n+\t\tres[i] = int(atomic.LoadInt64(p.counters[i]))\n+\t}\n+\t//copy(res, p.counters)","path":"golang/src/tcpcall/pool.go","position":157,"original_position":135,"commit_id":"d03be5cd096387b7c284c604889f624cd263f9c2","original_commit_id":"7f9223d483c4ab6475a5e406498dd7e3dfedc1b5","user":{"login":"tuxofil","id":1380515,"node_id":"MDQ6VXNlcjEzODA1MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/1380515?v=4","gravatar_id":"","url":"https://api.github.com/users/tuxofil","html_url":"https://github.com/tuxofil","followers_url":"https://api.github.com/users/tuxofil/followers","following_url":"https://api.github.com/users/tuxofil/following{/other_user}","gists_url":"https://api.github.com/users/tuxofil/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxofil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxofil/subscriptions","organizations_url":"https://api.github.com/users/tuxofil/orgs","repos_url":"https://api.github.com/users/tuxofil/repos","events_url":"https://api.github.com/users/tuxofil/events{/privacy}","received_events_url":"https://api.github.com/users/tuxofil/received_events","type":"User","site_admin":false},"body":"??","created_at":"2018-09-04T18:56:26Z","updated_at":"2018-09-04T18:56:26Z","html_url":"https://github.com/tuxofil/tcpcall/pull/3#discussion_r215029526","pull_request_url":"https://api.github.com/repos/tuxofil/tcpcall/pulls/3","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/tuxofil/tcpcall/pulls/comments/215029526"},"html":{"href":"https://github.com/tuxofil/tcpcall/pull/3#discussion_r215029526"},"pull_request":{"href":"https://api.github.com/repos/tuxofil/tcpcall/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/tuxofil/tcpcall/pulls/3","id":193950529,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzOTUwNTI5","html_url":"https://github.com/tuxofil/tcpcall/pull/3","diff_url":"https://github.com/tuxofil/tcpcall/pull/3.diff","patch_url":"https://github.com/tuxofil/tcpcall/pull/3.patch","issue_url":"https://api.github.com/repos/tuxofil/tcpcall/issues/3","number":3,"state":"open","locked":false,"title":"Make tcpcall faster and use less memory","user":{"login":"ffenix113","id":1863154,"node_id":"MDQ6VXNlcjE4NjMxNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1863154?v=4","gravatar_id":"","url":"https://api.github.com/users/ffenix113","html_url":"https://github.com/ffenix113","followers_url":"https://api.github.com/users/ffenix113/followers","following_url":"https://api.github.com/users/ffenix113/following{/other_user}","gists_url":"https://api.github.com/users/ffenix113/gists{/gist_id}","starred_url":"https://api.github.com/users/ffenix113/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffenix113/subscriptions","organizations_url":"https://api.github.com/users/ffenix113/orgs","repos_url":"https://api.github.com/users/ffenix113/repos","events_url":"https://api.github.com/users/ffenix113/events{/privacy}","received_events_url":"https://api.github.com/users/ffenix113/received_events","type":"User","site_admin":false},"body":"This is not final PR, but a proposal to review.","created_at":"2018-06-11T11:23:05Z","updated_at":"2018-09-04T18:56:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2de02fb6c982563e1a2ca8b9bc495a387c8954a4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tuxofil/tcpcall/pulls/3/commits","review_comments_url":"https://api.github.com/repos/tuxofil/tcpcall/pulls/3/comments","review_comment_url":"https://api.github.com/repos/tuxofil/tcpcall/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tuxofil/tcpcall/issues/3/comments","statuses_url":"https://api.github.com/repos/tuxofil/tcpcall/statuses/d03be5cd096387b7c284c604889f624cd263f9c2","head":{"label":"ffenix113:feature_2961","ref":"feature_2961","sha":"d03be5cd096387b7c284c604889f624cd263f9c2","user":{"login":"ffenix113","id":1863154,"node_id":"MDQ6VXNlcjE4NjMxNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1863154?v=4","gravatar_id":"","url":"https://api.github.com/users/ffenix113","html_url":"https://github.com/ffenix113","followers_url":"https://api.github.com/users/ffenix113/followers","following_url":"https://api.github.com/users/ffenix113/following{/other_user}","gists_url":"https://api.github.com/users/ffenix113/gists{/gist_id}","starred_url":"https://api.github.com/users/ffenix113/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffenix113/subscriptions","organizations_url":"https://api.github.com/users/ffenix113/orgs","repos_url":"https://api.github.com/users/ffenix113/repos","events_url":"https://api.github.com/users/ffenix113/events{/privacy}","received_events_url":"https://api.github.com/users/ffenix113/received_events","type":"User","site_admin":false},"repo":{"id":136916154,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY5MTYxNTQ=","name":"tcpcall","full_name":"ffenix113/tcpcall","owner":{"login":"ffenix113","id":1863154,"node_id":"MDQ6VXNlcjE4NjMxNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1863154?v=4","gravatar_id":"","url":"https://api.github.com/users/ffenix113","html_url":"https://github.com/ffenix113","followers_url":"https://api.github.com/users/ffenix113/followers","following_url":"https://api.github.com/users/ffenix113/following{/other_user}","gists_url":"https://api.github.com/users/ffenix113/gists{/gist_id}","starred_url":"https://api.github.com/users/ffenix113/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffenix113/subscriptions","organizations_url":"https://api.github.com/users/ffenix113/orgs","repos_url":"https://api.github.com/users/ffenix113/repos","events_url":"https://api.github.com/users/ffenix113/events{/privacy}","received_events_url":"https://api.github.com/users/ffenix113/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ffenix113/tcpcall","description":"TCP-based Request-Reply Bridge for Erlang/Golang nodes.","fork":true,"url":"https://api.github.com/repos/ffenix113/tcpcall","forks_url":"https://api.github.com/repos/ffenix113/tcpcall/forks","keys_url":"https://api.github.com/repos/ffenix113/tcpcall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ffenix113/tcpcall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ffenix113/tcpcall/teams","hooks_url":"https://api.github.com/repos/ffenix113/tcpcall/hooks","issue_events_url":"https://api.github.com/repos/ffenix113/tcpcall/issues/events{/number}","events_url":"https://api.github.com/repos/ffenix113/tcpcall/events","assignees_url":"https://api.github.com/repos/ffenix113/tcpcall/assignees{/user}","branches_url":"https://api.github.com/repos/ffenix113/tcpcall/branches{/branch}","tags_url":"https://api.github.com/repos/ffenix113/tcpcall/tags","blobs_url":"https://api.github.com/repos/ffenix113/tcpcall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ffenix113/tcpcall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ffenix113/tcpcall/git/refs{/sha}","trees_url":"https://api.github.com/repos/ffenix113/tcpcall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ffenix113/tcpcall/statuses/{sha}","languages_url":"https://api.github.com/repos/ffenix113/tcpcall/languages","stargazers_url":"https://api.github.com/repos/ffenix113/tcpcall/stargazers","contributors_url":"https://api.github.com/repos/ffenix113/tcpcall/contributors","subscribers_url":"https://api.github.com/repos/ffenix113/tcpcall/subscribers","subscription_url":"https://api.github.com/repos/ffenix113/tcpcall/subscription","commits_url":"https://api.github.com/repos/ffenix113/tcpcall/commits{/sha}","git_commits_url":"https://api.github.com/repos/ffenix113/tcpcall/git/commits{/sha}","comments_url":"https://api.github.com/repos/ffenix113/tcpcall/comments{/number}","issue_comment_url":"https://api.github.com/repos/ffenix113/tcpcall/issues/comments{/number}","contents_url":"https://api.github.com/repos/ffenix113/tcpcall/contents/{+path}","compare_url":"https://api.github.com/repos/ffenix113/tcpcall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ffenix113/tcpcall/merges","archive_url":"https://api.github.com/repos/ffenix113/tcpcall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ffenix113/tcpcall/downloads","issues_url":"https://api.github.com/repos/ffenix113/tcpcall/issues{/number}","pulls_url":"https://api.github.com/repos/ffenix113/tcpcall/pulls{/number}","milestones_url":"https://api.github.com/repos/ffenix113/tcpcall/milestones{/number}","notifications_url":"https://api.github.com/repos/ffenix113/tcpcall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ffenix113/tcpcall/labels{/name}","releases_url":"https://api.github.com/repos/ffenix113/tcpcall/releases{/id}","deployments_url":"https://api.github.com/repos/ffenix113/tcpcall/deployments","created_at":"2018-06-11T11:20:19Z","updated_at":"2018-06-11T11:20:21Z","pushed_at":"2018-07-04T14:58:20Z","git_url":"git://github.com/ffenix113/tcpcall.git","ssh_url":"git@github.com:ffenix113/tcpcall.git","clone_url":"https://github.com/ffenix113/tcpcall.git","svn_url":"https://github.com/ffenix113/tcpcall","homepage":"","size":222,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tuxofil:master","ref":"master","sha":"0dfbde0ba4a9366bfac676b8e17cc509cbbec290","user":{"login":"tuxofil","id":1380515,"node_id":"MDQ6VXNlcjEzODA1MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/1380515?v=4","gravatar_id":"","url":"https://api.github.com/users/tuxofil","html_url":"https://github.com/tuxofil","followers_url":"https://api.github.com/users/tuxofil/followers","following_url":"https://api.github.com/users/tuxofil/following{/other_user}","gists_url":"https://api.github.com/users/tuxofil/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxofil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxofil/subscriptions","organizations_url":"https://api.github.com/users/tuxofil/orgs","repos_url":"https://api.github.com/users/tuxofil/repos","events_url":"https://api.github.com/users/tuxofil/events{/privacy}","received_events_url":"https://api.github.com/users/tuxofil/received_events","type":"User","site_admin":false},"repo":{"id":26590136,"node_id":"MDEwOlJlcG9zaXRvcnkyNjU5MDEzNg==","name":"tcpcall","full_name":"tuxofil/tcpcall","owner":{"login":"tuxofil","id":1380515,"node_id":"MDQ6VXNlcjEzODA1MTU=","avatar_url":"https://avatars2.githubusercontent.com/u/1380515?v=4","gravatar_id":"","url":"https://api.github.com/users/tuxofil","html_url":"https://github.com/tuxofil","followers_url":"https://api.github.com/users/tuxofil/followers","following_url":"https://api.github.com/users/tuxofil/following{/other_user}","gists_url":"https://api.github.com/users/tuxofil/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxofil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxofil/subscriptions","organizations_url":"https://api.github.com/users/tuxofil/orgs","repos_url":"https://api.github.com/users/tuxofil/repos","events_url":"https://api.github.com/users/tuxofil/events{/privacy}","received_events_url":"https://api.github.com/users/tuxofil/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tuxofil/tcpcall","description":"TCP-based Request-Reply Bridge for Erlang/Golang nodes.","fork":false,"url":"https://api.github.com/repos/tuxofil/tcpcall","forks_url":"https://api.github.com/repos/tuxofil/tcpcall/forks","keys_url":"https://api.github.com/repos/tuxofil/tcpcall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tuxofil/tcpcall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tuxofil/tcpcall/teams","hooks_url":"https://api.github.com/repos/tuxofil/tcpcall/hooks","issue_events_url":"https://api.github.com/repos/tuxofil/tcpcall/issues/events{/number}","events_url":"https://api.github.com/repos/tuxofil/tcpcall/events","assignees_url":"https://api.github.com/repos/tuxofil/tcpcall/assignees{/user}","branches_url":"https://api.github.com/repos/tuxofil/tcpcall/branches{/branch}","tags_url":"https://api.github.com/repos/tuxofil/tcpcall/tags","blobs_url":"https://api.github.com/repos/tuxofil/tcpcall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tuxofil/tcpcall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tuxofil/tcpcall/git/refs{/sha}","trees_url":"https://api.github.com/repos/tuxofil/tcpcall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tuxofil/tcpcall/statuses/{sha}","languages_url":"https://api.github.com/repos/tuxofil/tcpcall/languages","stargazers_url":"https://api.github.com/repos/tuxofil/tcpcall/stargazers","contributors_url":"https://api.github.com/repos/tuxofil/tcpcall/contributors","subscribers_url":"https://api.github.com/repos/tuxofil/tcpcall/subscribers","subscription_url":"https://api.github.com/repos/tuxofil/tcpcall/subscription","commits_url":"https://api.github.com/repos/tuxofil/tcpcall/commits{/sha}","git_commits_url":"https://api.github.com/repos/tuxofil/tcpcall/git/commits{/sha}","comments_url":"https://api.github.com/repos/tuxofil/tcpcall/comments{/number}","issue_comment_url":"https://api.github.com/repos/tuxofil/tcpcall/issues/comments{/number}","contents_url":"https://api.github.com/repos/tuxofil/tcpcall/contents/{+path}","compare_url":"https://api.github.com/repos/tuxofil/tcpcall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tuxofil/tcpcall/merges","archive_url":"https://api.github.com/repos/tuxofil/tcpcall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tuxofil/tcpcall/downloads","issues_url":"https://api.github.com/repos/tuxofil/tcpcall/issues{/number}","pulls_url":"https://api.github.com/repos/tuxofil/tcpcall/pulls{/number}","milestones_url":"https://api.github.com/repos/tuxofil/tcpcall/milestones{/number}","notifications_url":"https://api.github.com/repos/tuxofil/tcpcall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tuxofil/tcpcall/labels{/name}","releases_url":"https://api.github.com/repos/tuxofil/tcpcall/releases{/id}","deployments_url":"https://api.github.com/repos/tuxofil/tcpcall/deployments","created_at":"2014-11-13T13:58:56Z","updated_at":"2018-04-28T09:27:42Z","pushed_at":"2018-07-04T14:58:21Z","git_url":"git://github.com/tuxofil/tcpcall.git","ssh_url":"git@github.com:tuxofil/tcpcall.git","clone_url":"https://github.com/tuxofil/tcpcall.git","svn_url":"https://github.com/tuxofil/tcpcall","homepage":"","size":204,"stargazers_count":2,"watchers_count":2,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tuxofil/tcpcall/pulls/3"},"html":{"href":"https://github.com/tuxofil/tcpcall/pull/3"},"issue":{"href":"https://api.github.com/repos/tuxofil/tcpcall/issues/3"},"comments":{"href":"https://api.github.com/repos/tuxofil/tcpcall/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/tuxofil/tcpcall/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/tuxofil/tcpcall/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tuxofil/tcpcall/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/tuxofil/tcpcall/statuses/d03be5cd096387b7c284c604889f624cd263f9c2"}},"author_association":"NONE"}}
{"actor":{"display_login":"tuxofil"}}