{"action":"created","comment":{"url":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/comments/269240804","pull_request_review_id":219066828,"id":269240804,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2OTI0MDgwNA==","diff_hunk":"@@ -36,36 +34,29 @@\n  */\n @NotThreadSafe\n final class ThreadWorkQueue<T> {\n-    private final Set<Long> activeQueuedThreads = new LinkedHashSet<>();\n-    private final Map<Long, Queue<T>> queuedRequests = new HashMap<>();\n+    private final Map<Long, Queue<T>> queuedRequests = new LinkedHashMap<>();\n \n     boolean isEmpty() {\n         return activeQueuedThreads.isEmpty();\n     }\n \n     void add(T element) {\n         long threadId = Thread.currentThread().getId();\n-        if (!activeQueuedThreads.contains(threadId)) {\n-            activeQueuedThreads.add(threadId);\n-        }\n         queue(threadId).add(element);\n     }\n \n     T remove() {\n-        long id = nextThread();\n-        Queue<T> workQueue = queuedRequests.get(id);\n-        T result = workQueue.remove();\n-        if (workQueue.isEmpty()) {\n-            queuedRequests.remove(id);\n-        } else {\n-            activeQueuedThreads.add(id);\n+        Map.Entry<Long, Queue<T>> workQueue = queuedRequests.get(id);","path":"okhttp-clients/src/main/java/com/palantir/conjure/java/okhttp/ThreadWorkQueue.java","position":42,"original_position":42,"commit_id":"8eac29538bfdf8ee5b01e2b5f369c535e53aea0a","original_commit_id":"8eac29538bfdf8ee5b01e2b5f369c535e53aea0a","user":{"login":"iamdanfox","id":3473798,"node_id":"MDQ6VXNlcjM0NzM3OTg=","avatar_url":"https://avatars1.githubusercontent.com/u/3473798?v=4","gravatar_id":"","url":"https://api.github.com/users/iamdanfox","html_url":"https://github.com/iamdanfox","followers_url":"https://api.github.com/users/iamdanfox/followers","following_url":"https://api.github.com/users/iamdanfox/following{/other_user}","gists_url":"https://api.github.com/users/iamdanfox/gists{/gist_id}","starred_url":"https://api.github.com/users/iamdanfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamdanfox/subscriptions","organizations_url":"https://api.github.com/users/iamdanfox/orgs","repos_url":"https://api.github.com/users/iamdanfox/repos","events_url":"https://api.github.com/users/iamdanfox/events{/privacy}","received_events_url":"https://api.github.com/users/iamdanfox/received_events","type":"User","site_admin":false},"body":"do you just want to getfirst here?","created_at":"2019-03-26T17:56:39Z","updated_at":"2019-03-26T17:56:39Z","html_url":"https://github.com/palantir/conjure-java-runtime/pull/1006#discussion_r269240804","pull_request_url":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/1006","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/comments/269240804"},"html":{"href":"https://github.com/palantir/conjure-java-runtime/pull/1006#discussion_r269240804"},"pull_request":{"href":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/1006"}}},"pull_request":{"url":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/1006","id":264617569,"node_id":"MDExOlB1bGxSZXF1ZXN0MjY0NjE3NTY5","html_url":"https://github.com/palantir/conjure-java-runtime/pull/1006","diff_url":"https://github.com/palantir/conjure-java-runtime/pull/1006.diff","patch_url":"https://github.com/palantir/conjure-java-runtime/pull/1006.patch","issue_url":"https://api.github.com/repos/palantir/conjure-java-runtime/issues/1006","number":1006,"state":"open","locked":false,"title":"Simplify threadworkqueue","user":{"login":"j-baker","id":42533,"node_id":"MDQ6VXNlcjQyNTMz","avatar_url":"https://avatars2.githubusercontent.com/u/42533?v=4","gravatar_id":"","url":"https://api.github.com/users/j-baker","html_url":"https://github.com/j-baker","followers_url":"https://api.github.com/users/j-baker/followers","following_url":"https://api.github.com/users/j-baker/following{/other_user}","gists_url":"https://api.github.com/users/j-baker/gists{/gist_id}","starred_url":"https://api.github.com/users/j-baker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-baker/subscriptions","organizations_url":"https://api.github.com/users/j-baker/orgs","repos_url":"https://api.github.com/users/j-baker/repos","events_url":"https://api.github.com/users/j-baker/events{/privacy}","received_events_url":"https://api.github.com/users/j-baker/received_events","type":"User","site_admin":false},"body":"No behaviour change, simpler implementation.","created_at":"2019-03-26T17:15:04Z","updated_at":"2019-03-26T17:56:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f1e0ce5ce86f1c124415b3bb5895229a16b9066","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/1006/commits","review_comments_url":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/1006/comments","review_comment_url":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/palantir/conjure-java-runtime/issues/1006/comments","statuses_url":"https://api.github.com/repos/palantir/conjure-java-runtime/statuses/8eac29538bfdf8ee5b01e2b5f369c535e53aea0a","head":{"label":"palantir:j-baker-patch-1","ref":"j-baker-patch-1","sha":"8eac29538bfdf8ee5b01e2b5f369c535e53aea0a","user":{"login":"palantir","id":303157,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMzE1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/303157?v=4","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":43088077,"node_id":"MDEwOlJlcG9zaXRvcnk0MzA4ODA3Nw==","name":"conjure-java-runtime","full_name":"palantir/conjure-java-runtime","private":false,"owner":{"login":"palantir","id":303157,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMzE1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/303157?v=4","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/palantir/conjure-java-runtime","description":"Opinionated libraries for HTTP&JSON-based RPC using Retrofit, Feign, OkHttp as clients and Jetty/Jersey as servers","fork":false,"url":"https://api.github.com/repos/palantir/conjure-java-runtime","forks_url":"https://api.github.com/repos/palantir/conjure-java-runtime/forks","keys_url":"https://api.github.com/repos/palantir/conjure-java-runtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/conjure-java-runtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/conjure-java-runtime/teams","hooks_url":"https://api.github.com/repos/palantir/conjure-java-runtime/hooks","issue_events_url":"https://api.github.com/repos/palantir/conjure-java-runtime/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/conjure-java-runtime/events","assignees_url":"https://api.github.com/repos/palantir/conjure-java-runtime/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/conjure-java-runtime/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/conjure-java-runtime/tags","blobs_url":"https://api.github.com/repos/palantir/conjure-java-runtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/conjure-java-runtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/conjure-java-runtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/conjure-java-runtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/conjure-java-runtime/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/conjure-java-runtime/languages","stargazers_url":"https://api.github.com/repos/palantir/conjure-java-runtime/stargazers","contributors_url":"https://api.github.com/repos/palantir/conjure-java-runtime/contributors","subscribers_url":"https://api.github.com/repos/palantir/conjure-java-runtime/subscribers","subscription_url":"https://api.github.com/repos/palantir/conjure-java-runtime/subscription","commits_url":"https://api.github.com/repos/palantir/conjure-java-runtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/conjure-java-runtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/conjure-java-runtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/conjure-java-runtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/conjure-java-runtime/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/conjure-java-runtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/conjure-java-runtime/merges","archive_url":"https://api.github.com/repos/palantir/conjure-java-runtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/conjure-java-runtime/downloads","issues_url":"https://api.github.com/repos/palantir/conjure-java-runtime/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/conjure-java-runtime/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/conjure-java-runtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/conjure-java-runtime/labels{/name}","releases_url":"https://api.github.com/repos/palantir/conjure-java-runtime/releases{/id}","deployments_url":"https://api.github.com/repos/palantir/conjure-java-runtime/deployments","created_at":"2015-09-24T19:24:22Z","updated_at":"2019-03-26T17:44:33Z","pushed_at":"2019-03-26T17:44:31Z","git_url":"git://github.com/palantir/conjure-java-runtime.git","ssh_url":"git@github.com:palantir/conjure-java-runtime.git","clone_url":"https://github.com/palantir/conjure-java-runtime.git","svn_url":"https://github.com/palantir/conjure-java-runtime","homepage":"","size":3663,"stargazers_count":56,"watchers_count":56,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":85,"open_issues":34,"watchers":56,"default_branch":"develop"}},"base":{"label":"palantir:develop","ref":"develop","sha":"79378c9e9366182eca8a2ed030a0e69f35597a1e","user":{"login":"palantir","id":303157,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMzE1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/303157?v=4","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":43088077,"node_id":"MDEwOlJlcG9zaXRvcnk0MzA4ODA3Nw==","name":"conjure-java-runtime","full_name":"palantir/conjure-java-runtime","private":false,"owner":{"login":"palantir","id":303157,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMzE1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/303157?v=4","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/palantir/conjure-java-runtime","description":"Opinionated libraries for HTTP&JSON-based RPC using Retrofit, Feign, OkHttp as clients and Jetty/Jersey as servers","fork":false,"url":"https://api.github.com/repos/palantir/conjure-java-runtime","forks_url":"https://api.github.com/repos/palantir/conjure-java-runtime/forks","keys_url":"https://api.github.com/repos/palantir/conjure-java-runtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/conjure-java-runtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/conjure-java-runtime/teams","hooks_url":"https://api.github.com/repos/palantir/conjure-java-runtime/hooks","issue_events_url":"https://api.github.com/repos/palantir/conjure-java-runtime/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/conjure-java-runtime/events","assignees_url":"https://api.github.com/repos/palantir/conjure-java-runtime/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/conjure-java-runtime/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/conjure-java-runtime/tags","blobs_url":"https://api.github.com/repos/palantir/conjure-java-runtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/conjure-java-runtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/conjure-java-runtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/conjure-java-runtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/conjure-java-runtime/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/conjure-java-runtime/languages","stargazers_url":"https://api.github.com/repos/palantir/conjure-java-runtime/stargazers","contributors_url":"https://api.github.com/repos/palantir/conjure-java-runtime/contributors","subscribers_url":"https://api.github.com/repos/palantir/conjure-java-runtime/subscribers","subscription_url":"https://api.github.com/repos/palantir/conjure-java-runtime/subscription","commits_url":"https://api.github.com/repos/palantir/conjure-java-runtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/conjure-java-runtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/conjure-java-runtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/conjure-java-runtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/conjure-java-runtime/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/conjure-java-runtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/conjure-java-runtime/merges","archive_url":"https://api.github.com/repos/palantir/conjure-java-runtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/conjure-java-runtime/downloads","issues_url":"https://api.github.com/repos/palantir/conjure-java-runtime/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/conjure-java-runtime/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/conjure-java-runtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/conjure-java-runtime/labels{/name}","releases_url":"https://api.github.com/repos/palantir/conjure-java-runtime/releases{/id}","deployments_url":"https://api.github.com/repos/palantir/conjure-java-runtime/deployments","created_at":"2015-09-24T19:24:22Z","updated_at":"2019-03-26T17:44:33Z","pushed_at":"2019-03-26T17:44:31Z","git_url":"git://github.com/palantir/conjure-java-runtime.git","ssh_url":"git@github.com:palantir/conjure-java-runtime.git","clone_url":"https://github.com/palantir/conjure-java-runtime.git","svn_url":"https://github.com/palantir/conjure-java-runtime","homepage":"","size":3663,"stargazers_count":56,"watchers_count":56,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":85,"open_issues":34,"watchers":56,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/1006"},"html":{"href":"https://github.com/palantir/conjure-java-runtime/pull/1006"},"issue":{"href":"https://api.github.com/repos/palantir/conjure-java-runtime/issues/1006"},"comments":{"href":"https://api.github.com/repos/palantir/conjure-java-runtime/issues/1006/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/1006/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/palantir/conjure-java-runtime/pulls/1006/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/conjure-java-runtime/statuses/8eac29538bfdf8ee5b01e2b5f369c535e53aea0a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"iamdanfox"}}