{"action":"created","comment":{"url":"https://api.github.com/repos/NexTraq/heimdall/pulls/comments/24354049","id":24354049,"diff_hunk":"@@ -0,0 +1,29 @@\n+package com.nextraq.heimdall.pool;\n+\n+import java.net.InetSocketAddress;\n+\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import com.nextraq.heimdall.io.Protocol;\n+\n+public class InboundWorker implements Runnable {","path":"src/main/java/com/nextraq/heimdall/pool/InboundWorker.java","position":10,"original_position":10,"commit_id":"d10f66bebe5fc94572f57d8ebad8b6d1bb9b00d4","original_commit_id":"d10f66bebe5fc94572f57d8ebad8b6d1bb9b00d4","user":{"login":"nexdrew","id":1929625,"avatar_url":"https://avatars.githubusercontent.com/u/1929625?v=3","gravatar_id":"","url":"https://api.github.com/users/nexdrew","html_url":"https://github.com/nexdrew","followers_url":"https://api.github.com/users/nexdrew/followers","following_url":"https://api.github.com/users/nexdrew/following{/other_user}","gists_url":"https://api.github.com/users/nexdrew/gists{/gist_id}","starred_url":"https://api.github.com/users/nexdrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nexdrew/subscriptions","organizations_url":"https://api.github.com/users/nexdrew/orgs","repos_url":"https://api.github.com/users/nexdrew/repos","events_url":"https://api.github.com/users/nexdrew/events{/privacy}","received_events_url":"https://api.github.com/users/nexdrew/received_events","type":"User","site_admin":false},"body":"I would prefer this be named `InboundWorkerTask` (or similar), to clarify that it represents \"work to be done\" rather than \"something doing the work\", but that's just a suggestion.","created_at":"2015-02-09T18:56:23Z","updated_at":"2015-02-09T18:56:23Z","html_url":"https://github.com/NexTraq/heimdall/pull/10#discussion_r24354049","pull_request_url":"https://api.github.com/repos/NexTraq/heimdall/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/NexTraq/heimdall/pulls/comments/24354049"},"html":{"href":"https://github.com/NexTraq/heimdall/pull/10#discussion_r24354049"},"pull_request":{"href":"https://api.github.com/repos/NexTraq/heimdall/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/NexTraq/heimdall/pulls/10","id":28940494,"html_url":"https://github.com/NexTraq/heimdall/pull/10","diff_url":"https://github.com/NexTraq/heimdall/pull/10.diff","patch_url":"https://github.com/NexTraq/heimdall/pull/10.patch","issue_url":"https://api.github.com/repos/NexTraq/heimdall/issues/10","number":10,"state":"open","locked":false,"title":"Inbound worker pool","user":{"login":"brad-bowie","id":3856142,"avatar_url":"https://avatars.githubusercontent.com/u/3856142?v=3","gravatar_id":"","url":"https://api.github.com/users/brad-bowie","html_url":"https://github.com/brad-bowie","followers_url":"https://api.github.com/users/brad-bowie/followers","following_url":"https://api.github.com/users/brad-bowie/following{/other_user}","gists_url":"https://api.github.com/users/brad-bowie/gists{/gist_id}","starred_url":"https://api.github.com/users/brad-bowie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brad-bowie/subscriptions","organizations_url":"https://api.github.com/users/brad-bowie/orgs","repos_url":"https://api.github.com/users/brad-bowie/repos","events_url":"https://api.github.com/users/brad-bowie/events{/privacy}","received_events_url":"https://api.github.com/users/brad-bowie/received_events","type":"User","site_admin":false},"body":"Implementation for the thread pool of inbound workers... Workers themselves are still empty, but that implementation will be rather straight forward.\r\n\r\nWorth a note and harder look is how the thread pool is allocated and handled. Based on the requirement of the unbound queue (since we don't want to lose jobs via rejection on the queue being full), I've implemented a somewhat-hacky solution that will manually handle queueing and creating threads. The alternative (and more standard) approach to this would be to use a fixed thread pool\r\n\r\nThe problem is due to the backing queue being unbound, and therefore it will never request a new thread to be commissioned by nature. Because of this, the thread pool will never grow past the `corePoolSize`\r\n\r\nhttp://stackoverflow.com/questions/15485840/threadpoolexecutor-with-unbounded-queue-not-creating-new-threads","created_at":"2015-02-09T17:38:30Z","updated_at":"2015-02-09T18:56:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12a6cf01fd93cd653497f72c265a426f7de6b0e8","assignee":{"login":"nexdrew","id":1929625,"avatar_url":"https://avatars.githubusercontent.com/u/1929625?v=3","gravatar_id":"","url":"https://api.github.com/users/nexdrew","html_url":"https://github.com/nexdrew","followers_url":"https://api.github.com/users/nexdrew/followers","following_url":"https://api.github.com/users/nexdrew/following{/other_user}","gists_url":"https://api.github.com/users/nexdrew/gists{/gist_id}","starred_url":"https://api.github.com/users/nexdrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nexdrew/subscriptions","organizations_url":"https://api.github.com/users/nexdrew/orgs","repos_url":"https://api.github.com/users/nexdrew/repos","events_url":"https://api.github.com/users/nexdrew/events{/privacy}","received_events_url":"https://api.github.com/users/nexdrew/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/NexTraq/heimdall/pulls/10/commits","review_comments_url":"https://api.github.com/repos/NexTraq/heimdall/pulls/10/comments","review_comment_url":"https://api.github.com/repos/NexTraq/heimdall/pulls/comments/{number}","comments_url":"https://api.github.com/repos/NexTraq/heimdall/issues/10/comments","statuses_url":"https://api.github.com/repos/NexTraq/heimdall/statuses/d10f66bebe5fc94572f57d8ebad8b6d1bb9b00d4","head":{"label":"NexTraq:inbound-pool","ref":"inbound-pool","sha":"d10f66bebe5fc94572f57d8ebad8b6d1bb9b00d4","user":{"login":"NexTraq","id":10674617,"avatar_url":"https://avatars.githubusercontent.com/u/10674617?v=3","gravatar_id":"","url":"https://api.github.com/users/NexTraq","html_url":"https://github.com/NexTraq","followers_url":"https://api.github.com/users/NexTraq/followers","following_url":"https://api.github.com/users/NexTraq/following{/other_user}","gists_url":"https://api.github.com/users/NexTraq/gists{/gist_id}","starred_url":"https://api.github.com/users/NexTraq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NexTraq/subscriptions","organizations_url":"https://api.github.com/users/NexTraq/orgs","repos_url":"https://api.github.com/users/NexTraq/repos","events_url":"https://api.github.com/users/NexTraq/events{/privacy}","received_events_url":"https://api.github.com/users/NexTraq/received_events","type":"Organization","site_admin":false},"repo":{"id":29753986,"name":"heimdall","full_name":"NexTraq/heimdall","owner":{"login":"NexTraq","id":10674617,"avatar_url":"https://avatars.githubusercontent.com/u/10674617?v=3","gravatar_id":"","url":"https://api.github.com/users/NexTraq","html_url":"https://github.com/NexTraq","followers_url":"https://api.github.com/users/NexTraq/followers","following_url":"https://api.github.com/users/NexTraq/following{/other_user}","gists_url":"https://api.github.com/users/NexTraq/gists{/gist_id}","starred_url":"https://api.github.com/users/NexTraq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NexTraq/subscriptions","organizations_url":"https://api.github.com/users/NexTraq/orgs","repos_url":"https://api.github.com/users/NexTraq/repos","events_url":"https://api.github.com/users/NexTraq/events{/privacy}","received_events_url":"https://api.github.com/users/NexTraq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NexTraq/heimdall","description":"","fork":false,"url":"https://api.github.com/repos/NexTraq/heimdall","forks_url":"https://api.github.com/repos/NexTraq/heimdall/forks","keys_url":"https://api.github.com/repos/NexTraq/heimdall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NexTraq/heimdall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NexTraq/heimdall/teams","hooks_url":"https://api.github.com/repos/NexTraq/heimdall/hooks","issue_events_url":"https://api.github.com/repos/NexTraq/heimdall/issues/events{/number}","events_url":"https://api.github.com/repos/NexTraq/heimdall/events","assignees_url":"https://api.github.com/repos/NexTraq/heimdall/assignees{/user}","branches_url":"https://api.github.com/repos/NexTraq/heimdall/branches{/branch}","tags_url":"https://api.github.com/repos/NexTraq/heimdall/tags","blobs_url":"https://api.github.com/repos/NexTraq/heimdall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NexTraq/heimdall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NexTraq/heimdall/git/refs{/sha}","trees_url":"https://api.github.com/repos/NexTraq/heimdall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NexTraq/heimdall/statuses/{sha}","languages_url":"https://api.github.com/repos/NexTraq/heimdall/languages","stargazers_url":"https://api.github.com/repos/NexTraq/heimdall/stargazers","contributors_url":"https://api.github.com/repos/NexTraq/heimdall/contributors","subscribers_url":"https://api.github.com/repos/NexTraq/heimdall/subscribers","subscription_url":"https://api.github.com/repos/NexTraq/heimdall/subscription","commits_url":"https://api.github.com/repos/NexTraq/heimdall/commits{/sha}","git_commits_url":"https://api.github.com/repos/NexTraq/heimdall/git/commits{/sha}","comments_url":"https://api.github.com/repos/NexTraq/heimdall/comments{/number}","issue_comment_url":"https://api.github.com/repos/NexTraq/heimdall/issues/comments/{number}","contents_url":"https://api.github.com/repos/NexTraq/heimdall/contents/{+path}","compare_url":"https://api.github.com/repos/NexTraq/heimdall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NexTraq/heimdall/merges","archive_url":"https://api.github.com/repos/NexTraq/heimdall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NexTraq/heimdall/downloads","issues_url":"https://api.github.com/repos/NexTraq/heimdall/issues{/number}","pulls_url":"https://api.github.com/repos/NexTraq/heimdall/pulls{/number}","milestones_url":"https://api.github.com/repos/NexTraq/heimdall/milestones{/number}","notifications_url":"https://api.github.com/repos/NexTraq/heimdall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NexTraq/heimdall/labels{/name}","releases_url":"https://api.github.com/repos/NexTraq/heimdall/releases{/id}","created_at":"2015-01-23T21:27:51Z","updated_at":"2015-02-09T16:39:56Z","pushed_at":"2015-02-09T18:56:14Z","git_url":"git://github.com/NexTraq/heimdall.git","ssh_url":"git@github.com:NexTraq/heimdall.git","clone_url":"https://github.com/NexTraq/heimdall.git","svn_url":"https://github.com/NexTraq/heimdall","homepage":null,"size":454,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"NexTraq:master","ref":"master","sha":"ea0e3749def39e59e588169ad48d21d8ea8afb16","user":{"login":"NexTraq","id":10674617,"avatar_url":"https://avatars.githubusercontent.com/u/10674617?v=3","gravatar_id":"","url":"https://api.github.com/users/NexTraq","html_url":"https://github.com/NexTraq","followers_url":"https://api.github.com/users/NexTraq/followers","following_url":"https://api.github.com/users/NexTraq/following{/other_user}","gists_url":"https://api.github.com/users/NexTraq/gists{/gist_id}","starred_url":"https://api.github.com/users/NexTraq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NexTraq/subscriptions","organizations_url":"https://api.github.com/users/NexTraq/orgs","repos_url":"https://api.github.com/users/NexTraq/repos","events_url":"https://api.github.com/users/NexTraq/events{/privacy}","received_events_url":"https://api.github.com/users/NexTraq/received_events","type":"Organization","site_admin":false},"repo":{"id":29753986,"name":"heimdall","full_name":"NexTraq/heimdall","owner":{"login":"NexTraq","id":10674617,"avatar_url":"https://avatars.githubusercontent.com/u/10674617?v=3","gravatar_id":"","url":"https://api.github.com/users/NexTraq","html_url":"https://github.com/NexTraq","followers_url":"https://api.github.com/users/NexTraq/followers","following_url":"https://api.github.com/users/NexTraq/following{/other_user}","gists_url":"https://api.github.com/users/NexTraq/gists{/gist_id}","starred_url":"https://api.github.com/users/NexTraq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NexTraq/subscriptions","organizations_url":"https://api.github.com/users/NexTraq/orgs","repos_url":"https://api.github.com/users/NexTraq/repos","events_url":"https://api.github.com/users/NexTraq/events{/privacy}","received_events_url":"https://api.github.com/users/NexTraq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NexTraq/heimdall","description":"","fork":false,"url":"https://api.github.com/repos/NexTraq/heimdall","forks_url":"https://api.github.com/repos/NexTraq/heimdall/forks","keys_url":"https://api.github.com/repos/NexTraq/heimdall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NexTraq/heimdall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NexTraq/heimdall/teams","hooks_url":"https://api.github.com/repos/NexTraq/heimdall/hooks","issue_events_url":"https://api.github.com/repos/NexTraq/heimdall/issues/events{/number}","events_url":"https://api.github.com/repos/NexTraq/heimdall/events","assignees_url":"https://api.github.com/repos/NexTraq/heimdall/assignees{/user}","branches_url":"https://api.github.com/repos/NexTraq/heimdall/branches{/branch}","tags_url":"https://api.github.com/repos/NexTraq/heimdall/tags","blobs_url":"https://api.github.com/repos/NexTraq/heimdall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NexTraq/heimdall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NexTraq/heimdall/git/refs{/sha}","trees_url":"https://api.github.com/repos/NexTraq/heimdall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NexTraq/heimdall/statuses/{sha}","languages_url":"https://api.github.com/repos/NexTraq/heimdall/languages","stargazers_url":"https://api.github.com/repos/NexTraq/heimdall/stargazers","contributors_url":"https://api.github.com/repos/NexTraq/heimdall/contributors","subscribers_url":"https://api.github.com/repos/NexTraq/heimdall/subscribers","subscription_url":"https://api.github.com/repos/NexTraq/heimdall/subscription","commits_url":"https://api.github.com/repos/NexTraq/heimdall/commits{/sha}","git_commits_url":"https://api.github.com/repos/NexTraq/heimdall/git/commits{/sha}","comments_url":"https://api.github.com/repos/NexTraq/heimdall/comments{/number}","issue_comment_url":"https://api.github.com/repos/NexTraq/heimdall/issues/comments/{number}","contents_url":"https://api.github.com/repos/NexTraq/heimdall/contents/{+path}","compare_url":"https://api.github.com/repos/NexTraq/heimdall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NexTraq/heimdall/merges","archive_url":"https://api.github.com/repos/NexTraq/heimdall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NexTraq/heimdall/downloads","issues_url":"https://api.github.com/repos/NexTraq/heimdall/issues{/number}","pulls_url":"https://api.github.com/repos/NexTraq/heimdall/pulls{/number}","milestones_url":"https://api.github.com/repos/NexTraq/heimdall/milestones{/number}","notifications_url":"https://api.github.com/repos/NexTraq/heimdall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NexTraq/heimdall/labels{/name}","releases_url":"https://api.github.com/repos/NexTraq/heimdall/releases{/id}","created_at":"2015-01-23T21:27:51Z","updated_at":"2015-02-09T16:39:56Z","pushed_at":"2015-02-09T18:56:14Z","git_url":"git://github.com/NexTraq/heimdall.git","ssh_url":"git@github.com:NexTraq/heimdall.git","clone_url":"https://github.com/NexTraq/heimdall.git","svn_url":"https://github.com/NexTraq/heimdall","homepage":null,"size":454,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NexTraq/heimdall/pulls/10"},"html":{"href":"https://github.com/NexTraq/heimdall/pull/10"},"issue":{"href":"https://api.github.com/repos/NexTraq/heimdall/issues/10"},"comments":{"href":"https://api.github.com/repos/NexTraq/heimdall/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/NexTraq/heimdall/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/NexTraq/heimdall/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/NexTraq/heimdall/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/NexTraq/heimdall/statuses/d10f66bebe5fc94572f57d8ebad8b6d1bb9b00d4"}}}}