{"action":"created","comment":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/35083093","id":35083093,"diff_hunk":"@@ -43,26 +47,9 @@ public final void execute(BlockingRunnable runnable) {\n       if (shutdown) {\n          throw new RejectedExecutionException(\"Executor Service is already shutdown\");\n       }\n-      if (runnable.isReady()) {\n-         doExecute(runnable);\n-      } else {\n-         blockedTasks.offer(runnable);\n-         //case: T1 is adding a task and T2 is releasing one. problem to solve:\n-         //T1: is adding a new task. runnable.isReady() returns false\n-         //T2: meanwhile, T2 releases a resources that is blocking the T1's runnable\n-         //T2: also, T2 invokes checkForReadyTasks(), that does nothing because the queue is empty\n-         //T1: continues and add the runnable to the queue\n-         //problem: if no more interaction with this object is done, the runnable will be kept in the queue forever.\n-\n-         boolean checkPendingTasks;\n-         synchronized (blockedTasks) {\n-            //to synchronize with the thread invoking checkForReadyTasks();\n-            checkPendingTasks = runnable.isReady();\n-         }\n-         if (checkPendingTasks) {\n-            checkForReadyTasks();\n-         }\n-      }\n+      //we no longer submit directly to the executor service.\n+      blockedTasks.offer(runnable);","path":"core/src/main/java/org/infinispan/util/concurrent/BlockingTaskAwareExecutorServiceImpl.java","position":68,"original_position":68,"commit_id":"4a2f4dd8fab9942072131367e0e925bc0a7ce280","original_commit_id":"7150bed3c8755e1509f764dfeb8429b85b93d420","user":{"login":"pruivo","id":1492066,"avatar_url":"https://avatars.githubusercontent.com/u/1492066?v=3","gravatar_id":"","url":"https://api.github.com/users/pruivo","html_url":"https://github.com/pruivo","followers_url":"https://api.github.com/users/pruivo/followers","following_url":"https://api.github.com/users/pruivo/following{/other_user}","gists_url":"https://api.github.com/users/pruivo/gists{/gist_id}","starred_url":"https://api.github.com/users/pruivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pruivo/subscriptions","organizations_url":"https://api.github.com/users/pruivo/orgs","repos_url":"https://api.github.com/users/pruivo/repos","events_url":"https://api.github.com/users/pruivo/events{/privacy}","received_events_url":"https://api.github.com/users/pruivo/received_events","type":"User","site_admin":false},"body":"with the default configuration no, we don't. but a user could inject their own executor service and we can end up with OOB threads executing the commands. \r\n\r\nIMO, most of the cases our executor service is used, so it may be good to go directly through the executor service if the task is ready. ","created_at":"2015-07-21T09:09:57Z","updated_at":"2015-07-21T09:09:57Z","html_url":"https://github.com/infinispan/infinispan/pull/3581#discussion_r35083093","pull_request_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3581","_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/35083093"},"html":{"href":"https://github.com/infinispan/infinispan/pull/3581#discussion_r35083093"},"pull_request":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3581"}}},"pull_request":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/3581","id":39914077,"html_url":"https://github.com/infinispan/infinispan/pull/3581","diff_url":"https://github.com/infinispan/infinispan/pull/3581.diff","patch_url":"https://github.com/infinispan/infinispan/pull/3581.patch","issue_url":"https://api.github.com/repos/infinispan/infinispan/issues/3581","number":3581,"state":"open","locked":false,"title":"ISPN-5603 Make BlockingTaskAwareExecutorService.checkForReadyTasks() …","user":{"login":"pruivo","id":1492066,"avatar_url":"https://avatars.githubusercontent.com/u/1492066?v=3","gravatar_id":"","url":"https://api.github.com/users/pruivo","html_url":"https://github.com/pruivo","followers_url":"https://api.github.com/users/pruivo/followers","following_url":"https://api.github.com/users/pruivo/following{/other_user}","gists_url":"https://api.github.com/users/pruivo/gists{/gist_id}","starred_url":"https://api.github.com/users/pruivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pruivo/subscriptions","organizations_url":"https://api.github.com/users/pruivo/orgs","repos_url":"https://api.github.com/users/pruivo/repos","events_url":"https://api.github.com/users/pruivo/events{/privacy}","received_events_url":"https://api.github.com/users/pruivo/received_events","type":"User","site_admin":false},"body":"…asynchronous\r\n\r\nhttps://issues.jboss.org/browse/ISPN-5603","created_at":"2015-07-14T13:15:34Z","updated_at":"2015-07-21T09:09:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b0ed6d43ca303e0272c94d6a759f199344a89f5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3581/commits","review_comments_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3581/comments","review_comment_url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/infinispan/infinispan/issues/3581/comments","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/4a2f4dd8fab9942072131367e0e925bc0a7ce280","head":{"label":"pruivo:btaes_check_ready_async","ref":"btaes_check_ready_async","sha":"4a2f4dd8fab9942072131367e0e925bc0a7ce280","user":{"login":"pruivo","id":1492066,"avatar_url":"https://avatars.githubusercontent.com/u/1492066?v=3","gravatar_id":"","url":"https://api.github.com/users/pruivo","html_url":"https://github.com/pruivo","followers_url":"https://api.github.com/users/pruivo/followers","following_url":"https://api.github.com/users/pruivo/following{/other_user}","gists_url":"https://api.github.com/users/pruivo/gists{/gist_id}","starred_url":"https://api.github.com/users/pruivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pruivo/subscriptions","organizations_url":"https://api.github.com/users/pruivo/orgs","repos_url":"https://api.github.com/users/pruivo/repos","events_url":"https://api.github.com/users/pruivo/events{/privacy}","received_events_url":"https://api.github.com/users/pruivo/received_events","type":"User","site_admin":false},"repo":{"id":3626075,"name":"infinispan","full_name":"pruivo/infinispan","owner":{"login":"pruivo","id":1492066,"avatar_url":"https://avatars.githubusercontent.com/u/1492066?v=3","gravatar_id":"","url":"https://api.github.com/users/pruivo","html_url":"https://github.com/pruivo","followers_url":"https://api.github.com/users/pruivo/followers","following_url":"https://api.github.com/users/pruivo/following{/other_user}","gists_url":"https://api.github.com/users/pruivo/gists{/gist_id}","starred_url":"https://api.github.com/users/pruivo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pruivo/subscriptions","organizations_url":"https://api.github.com/users/pruivo/orgs","repos_url":"https://api.github.com/users/pruivo/repos","events_url":"https://api.github.com/users/pruivo/events{/privacy}","received_events_url":"https://api.github.com/users/pruivo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pruivo/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":true,"url":"https://api.github.com/repos/pruivo/infinispan","forks_url":"https://api.github.com/repos/pruivo/infinispan/forks","keys_url":"https://api.github.com/repos/pruivo/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pruivo/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pruivo/infinispan/teams","hooks_url":"https://api.github.com/repos/pruivo/infinispan/hooks","issue_events_url":"https://api.github.com/repos/pruivo/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/pruivo/infinispan/events","assignees_url":"https://api.github.com/repos/pruivo/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/pruivo/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/pruivo/infinispan/tags","blobs_url":"https://api.github.com/repos/pruivo/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pruivo/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pruivo/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/pruivo/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pruivo/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/pruivo/infinispan/languages","stargazers_url":"https://api.github.com/repos/pruivo/infinispan/stargazers","contributors_url":"https://api.github.com/repos/pruivo/infinispan/contributors","subscribers_url":"https://api.github.com/repos/pruivo/infinispan/subscribers","subscription_url":"https://api.github.com/repos/pruivo/infinispan/subscription","commits_url":"https://api.github.com/repos/pruivo/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/pruivo/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/pruivo/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/pruivo/infinispan/issues/comments{/number}","contents_url":"https://api.github.com/repos/pruivo/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/pruivo/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pruivo/infinispan/merges","archive_url":"https://api.github.com/repos/pruivo/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pruivo/infinispan/downloads","issues_url":"https://api.github.com/repos/pruivo/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/pruivo/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/pruivo/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/pruivo/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pruivo/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/pruivo/infinispan/releases{/id}","created_at":"2012-03-05T10:40:21Z","updated_at":"2015-05-08T17:30:13Z","pushed_at":"2015-07-20T16:11:12Z","git_url":"git://github.com/pruivo/infinispan.git","ssh_url":"git@github.com:pruivo/infinispan.git","clone_url":"https://github.com/pruivo/infinispan.git","svn_url":"https://github.com/pruivo/infinispan","homepage":"http://www.infinispan.org","size":76623,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":0,"forks":6,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"infinispan:master","ref":"master","sha":"78ab764539dabc098cdd2fd78f641e81db1fbc55","user":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"repo":{"id":1050944,"name":"infinispan","full_name":"infinispan/infinispan","owner":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infinispan/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":false,"url":"https://api.github.com/repos/infinispan/infinispan","forks_url":"https://api.github.com/repos/infinispan/infinispan/forks","keys_url":"https://api.github.com/repos/infinispan/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infinispan/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infinispan/infinispan/teams","hooks_url":"https://api.github.com/repos/infinispan/infinispan/hooks","issue_events_url":"https://api.github.com/repos/infinispan/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/infinispan/infinispan/events","assignees_url":"https://api.github.com/repos/infinispan/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/infinispan/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/infinispan/infinispan/tags","blobs_url":"https://api.github.com/repos/infinispan/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infinispan/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infinispan/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/infinispan/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/infinispan/infinispan/languages","stargazers_url":"https://api.github.com/repos/infinispan/infinispan/stargazers","contributors_url":"https://api.github.com/repos/infinispan/infinispan/contributors","subscribers_url":"https://api.github.com/repos/infinispan/infinispan/subscribers","subscription_url":"https://api.github.com/repos/infinispan/infinispan/subscription","commits_url":"https://api.github.com/repos/infinispan/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/infinispan/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/infinispan/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/infinispan/infinispan/issues/comments{/number}","contents_url":"https://api.github.com/repos/infinispan/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/infinispan/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infinispan/infinispan/merges","archive_url":"https://api.github.com/repos/infinispan/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infinispan/infinispan/downloads","issues_url":"https://api.github.com/repos/infinispan/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/infinispan/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/infinispan/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/infinispan/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infinispan/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/infinispan/infinispan/releases{/id}","created_at":"2010-11-04T12:33:19Z","updated_at":"2015-07-20T20:05:17Z","pushed_at":"2015-07-21T05:14:27Z","git_url":"git://github.com/infinispan/infinispan.git","ssh_url":"git@github.com:infinispan/infinispan.git","clone_url":"https://github.com/infinispan/infinispan.git","svn_url":"https://github.com/infinispan/infinispan","homepage":"http://www.infinispan.org","size":155301,"stargazers_count":389,"watchers_count":389,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":296,"mirror_url":null,"open_issues_count":24,"forks":296,"open_issues":24,"watchers":389,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3581"},"html":{"href":"https://github.com/infinispan/infinispan/pull/3581"},"issue":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/3581"},"comments":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/3581/comments"},"review_comments":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3581/comments"},"review_comment":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3581/commits"},"statuses":{"href":"https://api.github.com/repos/infinispan/infinispan/statuses/4a2f4dd8fab9942072131367e0e925bc0a7ce280"}}}}