{"action":"created","comment":{"url":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/comments/62448601","id":62448601,"diff_hunk":"@@ -54,7 +55,8 @@ impl<'a> Sentinel<'a> {\n impl<'a> Drop for Sentinel<'a> {\n     fn drop(&mut self) {\n         if self.active {\n-            *self.thread_counter.write().unwrap() -= 1;\n+            // TODO check return value and loop\n+            (*self.thread_counter).fetch_sub(1, Ordering::SeqCst);","path":"src/lib.rs","position":36,"original_position":36,"commit_id":"89c8af2500bc41bde811f56d5e55d9f8f4a0e2a4","original_commit_id":"89c8af2500bc41bde811f56d5e55d9f8f4a0e2a4","user":{"login":"BusyJay","id":1701473,"avatar_url":"https://avatars.githubusercontent.com/u/1701473?v=3","gravatar_id":"","url":"https://api.github.com/users/BusyJay","html_url":"https://github.com/BusyJay","followers_url":"https://api.github.com/users/BusyJay/followers","following_url":"https://api.github.com/users/BusyJay/following{/other_user}","gists_url":"https://api.github.com/users/BusyJay/gists{/gist_id}","starred_url":"https://api.github.com/users/BusyJay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BusyJay/subscriptions","organizations_url":"https://api.github.com/users/BusyJay/orgs","repos_url":"https://api.github.com/users/BusyJay/repos","events_url":"https://api.github.com/users/BusyJay/events{/privacy}","received_events_url":"https://api.github.com/users/BusyJay/received_events","type":"User","site_admin":false},"body":"I don't think `*` is needed.","created_at":"2016-05-09T04:03:19Z","updated_at":"2016-05-09T04:03:19Z","html_url":"https://github.com/frewsxcv/rust-threadpool/pull/25#discussion_r62448601","pull_request_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/comments/62448601"},"html":{"href":"https://github.com/frewsxcv/rust-threadpool/pull/25#discussion_r62448601"},"pull_request":{"href":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/25","id":69267109,"html_url":"https://github.com/frewsxcv/rust-threadpool/pull/25","diff_url":"https://github.com/frewsxcv/rust-threadpool/pull/25.diff","patch_url":"https://github.com/frewsxcv/rust-threadpool/pull/25.patch","issue_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/issues/25","number":25,"state":"open","locked":false,"title":"Use atomic counters","user":{"login":"dns2utf8","id":739070,"avatar_url":"https://avatars.githubusercontent.com/u/739070?v=3","gravatar_id":"","url":"https://api.github.com/users/dns2utf8","html_url":"https://github.com/dns2utf8","followers_url":"https://api.github.com/users/dns2utf8/followers","following_url":"https://api.github.com/users/dns2utf8/following{/other_user}","gists_url":"https://api.github.com/users/dns2utf8/gists{/gist_id}","starred_url":"https://api.github.com/users/dns2utf8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dns2utf8/subscriptions","organizations_url":"https://api.github.com/users/dns2utf8/orgs","repos_url":"https://api.github.com/users/dns2utf8/repos","events_url":"https://api.github.com/users/dns2utf8/events{/privacy}","received_events_url":"https://api.github.com/users/dns2utf8/received_events","type":"User","site_admin":false},"body":"I tried making the pool faster on NUMA systems but the effect is very minor, because the channel uses a Mutex.\r\n\r\nHowever, since I already did the work, I would like to share it.\r\n\r\nShould I rebase the history into one commit?","created_at":"2016-05-08T11:50:59Z","updated_at":"2016-05-09T04:03:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"70249d186a4fcf1a713fbe5ddbe6c2e2189183e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/25/commits","review_comments_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/25/comments","review_comment_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/comments{/number}","comments_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/issues/25/comments","statuses_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/statuses/89c8af2500bc41bde811f56d5e55d9f8f4a0e2a4","head":{"label":"dns2utf8:atomic","ref":"atomic","sha":"89c8af2500bc41bde811f56d5e55d9f8f4a0e2a4","user":{"login":"dns2utf8","id":739070,"avatar_url":"https://avatars.githubusercontent.com/u/739070?v=3","gravatar_id":"","url":"https://api.github.com/users/dns2utf8","html_url":"https://github.com/dns2utf8","followers_url":"https://api.github.com/users/dns2utf8/followers","following_url":"https://api.github.com/users/dns2utf8/following{/other_user}","gists_url":"https://api.github.com/users/dns2utf8/gists{/gist_id}","starred_url":"https://api.github.com/users/dns2utf8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dns2utf8/subscriptions","organizations_url":"https://api.github.com/users/dns2utf8/orgs","repos_url":"https://api.github.com/users/dns2utf8/repos","events_url":"https://api.github.com/users/dns2utf8/events{/privacy}","received_events_url":"https://api.github.com/users/dns2utf8/received_events","type":"User","site_admin":false},"repo":{"id":58196584,"name":"rust-threadpool","full_name":"dns2utf8/rust-threadpool","owner":{"login":"dns2utf8","id":739070,"avatar_url":"https://avatars.githubusercontent.com/u/739070?v=3","gravatar_id":"","url":"https://api.github.com/users/dns2utf8","html_url":"https://github.com/dns2utf8","followers_url":"https://api.github.com/users/dns2utf8/followers","following_url":"https://api.github.com/users/dns2utf8/following{/other_user}","gists_url":"https://api.github.com/users/dns2utf8/gists{/gist_id}","starred_url":"https://api.github.com/users/dns2utf8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dns2utf8/subscriptions","organizations_url":"https://api.github.com/users/dns2utf8/orgs","repos_url":"https://api.github.com/users/dns2utf8/repos","events_url":"https://api.github.com/users/dns2utf8/events{/privacy}","received_events_url":"https://api.github.com/users/dns2utf8/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dns2utf8/rust-threadpool","description":"A very simple thread pool for parallel task execution","fork":true,"url":"https://api.github.com/repos/dns2utf8/rust-threadpool","forks_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/forks","keys_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/teams","hooks_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/hooks","issue_events_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/issues/events{/number}","events_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/events","assignees_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/assignees{/user}","branches_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/branches{/branch}","tags_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/tags","blobs_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/git/refs{/sha}","trees_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/statuses/{sha}","languages_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/languages","stargazers_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/stargazers","contributors_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/contributors","subscribers_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/subscribers","subscription_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/subscription","commits_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/commits{/sha}","git_commits_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/git/commits{/sha}","comments_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/comments{/number}","issue_comment_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/issues/comments{/number}","contents_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/contents/{+path}","compare_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/merges","archive_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/downloads","issues_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/issues{/number}","pulls_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/pulls{/number}","milestones_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/milestones{/number}","notifications_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/labels{/name}","releases_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/releases{/id}","deployments_url":"https://api.github.com/repos/dns2utf8/rust-threadpool/deployments","created_at":"2016-05-06T09:31:30Z","updated_at":"2016-05-06T09:31:32Z","pushed_at":"2016-05-08T13:23:28Z","git_url":"git://github.com/dns2utf8/rust-threadpool.git","ssh_url":"git@github.com:dns2utf8/rust-threadpool.git","clone_url":"https://github.com/dns2utf8/rust-threadpool.git","svn_url":"https://github.com/dns2utf8/rust-threadpool","homepage":"https://crates.io/crates/threadpool","size":562,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"frewsxcv:master","ref":"master","sha":"3ef874c992241928ce098c0484c993117f905838","user":{"login":"frewsxcv","id":416575,"avatar_url":"https://avatars.githubusercontent.com/u/416575?v=3","gravatar_id":"","url":"https://api.github.com/users/frewsxcv","html_url":"https://github.com/frewsxcv","followers_url":"https://api.github.com/users/frewsxcv/followers","following_url":"https://api.github.com/users/frewsxcv/following{/other_user}","gists_url":"https://api.github.com/users/frewsxcv/gists{/gist_id}","starred_url":"https://api.github.com/users/frewsxcv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frewsxcv/subscriptions","organizations_url":"https://api.github.com/users/frewsxcv/orgs","repos_url":"https://api.github.com/users/frewsxcv/repos","events_url":"https://api.github.com/users/frewsxcv/events{/privacy}","received_events_url":"https://api.github.com/users/frewsxcv/received_events","type":"User","site_admin":false},"repo":{"id":31283475,"name":"rust-threadpool","full_name":"frewsxcv/rust-threadpool","owner":{"login":"frewsxcv","id":416575,"avatar_url":"https://avatars.githubusercontent.com/u/416575?v=3","gravatar_id":"","url":"https://api.github.com/users/frewsxcv","html_url":"https://github.com/frewsxcv","followers_url":"https://api.github.com/users/frewsxcv/followers","following_url":"https://api.github.com/users/frewsxcv/following{/other_user}","gists_url":"https://api.github.com/users/frewsxcv/gists{/gist_id}","starred_url":"https://api.github.com/users/frewsxcv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frewsxcv/subscriptions","organizations_url":"https://api.github.com/users/frewsxcv/orgs","repos_url":"https://api.github.com/users/frewsxcv/repos","events_url":"https://api.github.com/users/frewsxcv/events{/privacy}","received_events_url":"https://api.github.com/users/frewsxcv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/frewsxcv/rust-threadpool","description":"A very simple thread pool for parallel task execution","fork":false,"url":"https://api.github.com/repos/frewsxcv/rust-threadpool","forks_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/forks","keys_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/teams","hooks_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/hooks","issue_events_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/issues/events{/number}","events_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/events","assignees_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/assignees{/user}","branches_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/branches{/branch}","tags_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/tags","blobs_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/git/refs{/sha}","trees_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/statuses/{sha}","languages_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/languages","stargazers_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/stargazers","contributors_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/contributors","subscribers_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/subscribers","subscription_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/subscription","commits_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/commits{/sha}","git_commits_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/git/commits{/sha}","comments_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/comments{/number}","issue_comment_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/issues/comments{/number}","contents_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/contents/{+path}","compare_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/merges","archive_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/downloads","issues_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/issues{/number}","pulls_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls{/number}","milestones_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/milestones{/number}","notifications_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/labels{/name}","releases_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/releases{/id}","deployments_url":"https://api.github.com/repos/frewsxcv/rust-threadpool/deployments","created_at":"2015-02-24T21:41:52Z","updated_at":"2016-05-06T12:50:35Z","pushed_at":"2016-05-08T13:23:28Z","git_url":"git://github.com/frewsxcv/rust-threadpool.git","ssh_url":"git@github.com:frewsxcv/rust-threadpool.git","clone_url":"https://github.com/frewsxcv/rust-threadpool.git","svn_url":"https://github.com/frewsxcv/rust-threadpool","homepage":"https://crates.io/crates/threadpool","size":564,"stargazers_count":65,"watchers_count":65,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":4,"forks":17,"open_issues":4,"watchers":65,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/25"},"html":{"href":"https://github.com/frewsxcv/rust-threadpool/pull/25"},"issue":{"href":"https://api.github.com/repos/frewsxcv/rust-threadpool/issues/25"},"comments":{"href":"https://api.github.com/repos/frewsxcv/rust-threadpool/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/frewsxcv/rust-threadpool/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/frewsxcv/rust-threadpool/statuses/89c8af2500bc41bde811f56d5e55d9f8f4a0e2a4"}}}}